
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>ThreadPoolExecutor.md · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-ancre-navigation/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../website.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="线程池.html" />
    
    
    <link rel="prev" href="SUMMARY.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../环境搭建.html">
            
                <a href="../../环境搭建.html">
            
                    
                    环境搭建.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../算法/SUMMARY.html">
            
                <a href="../../算法/SUMMARY.html">
            
                    
                    算法
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../算法/动态规划.html">
            
                <a href="../../算法/动态规划.html">
            
                    
                    动态规划.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../../算法/区间操作-前缀和,差分.html">
            
                <a href="../../算法/区间操作-前缀和,差分.html">
            
                    
                    区间操作-前缀和,差分.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../../算法/区间操作2-线段树.html">
            
                <a href="../../算法/区间操作2-线段树.html">
            
                    
                    区间操作2-线段树.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../../算法/情景问题/SUMMARY.html">
            
                <a href="../../算法/情景问题/SUMMARY.html">
            
                    
                    情景问题
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.4.1" data-path="../../算法/情景问题/Knuth 洗牌算法.html">
            
                <a href="../../算法/情景问题/Knuth 洗牌算法.html">
            
                    
                    Knuth 洗牌算法.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.2" data-path="../../算法/情景问题/topN问题.html">
            
                <a href="../../算法/情景问题/topN问题.html">
            
                    
                    topN问题.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.3" data-path="../../算法/情景问题/切蛋糕问题.html">
            
                <a href="../../算法/情景问题/切蛋糕问题.html">
            
                    
                    切蛋糕问题.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.4" data-path="../../算法/情景问题/扔鸡蛋问题(求极值">
            
                <span>
            
                    
                    扔鸡蛋问题(求极值).md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../../算法/数据结构/SUMMARY.html">
            
                <a href="../../算法/数据结构/SUMMARY.html">
            
                    
                    数据结构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.5.1" data-path="../../算法/数据结构/树/SUMMARY.html">
            
                <a href="../../算法/数据结构/树/SUMMARY.html">
            
                    
                    树
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.5.1.1" data-path="../../算法/数据结构/树/树.html">
            
                <a href="../../算法/数据结构/树/树.html">
            
                    
                    树.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5.1.2" data-path="../../算法/数据结构/树/AVL树.html">
            
                <a href="../../算法/数据结构/树/AVL树.html">
            
                    
                    AVL树.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5.1.3" data-path="../../算法/数据结构/树/红黑树.html">
            
                <a href="../../算法/数据结构/树/红黑树.html">
            
                    
                    红黑树.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5.1.4" data-path="../../算法/数据结构/树/B+树.html">
            
                <a href="../../算法/数据结构/树/B+树.html">
            
                    
                    B+树.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5.1.5" data-path="../../算法/数据结构/树/B树.html">
            
                <a href="../../算法/数据结构/树/B树.html">
            
                    
                    B树.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../../算法/算法复杂度计算.html">
            
                <a href="../../算法/算法复杂度计算.html">
            
                    
                    算法复杂度计算.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../SUMMARY.html">
            
                <a href="../SUMMARY.html">
            
                    
                    Java
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../JAVA内存区域与JAVA内存模型.html">
            
                <a href="../JAVA内存区域与JAVA内存模型.html">
            
                    
                    JAVA内存区域与JAVA内存模型.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../一些有时候会忘记的编程规范.html">
            
                <a href="../一些有时候会忘记的编程规范.html">
            
                    
                    一些有时候会忘记的编程规范.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../基础/SUMMARY.html">
            
                <a href="../基础/SUMMARY.html">
            
                    
                    基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.1" data-path="../基础/基础中的基础/SUMMARY.html">
            
                <a href="../基础/基础中的基础/SUMMARY.html">
            
                    
                    基础中的基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.1.1" data-path="../基础/基础中的基础/JDK和JRE.html">
            
                <a href="../基础/基础中的基础/JDK和JRE.html">
            
                    
                    JDK和JRE.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.2" data-path="../基础/基础中的基础/重载和重写.html">
            
                <a href="../基础/基础中的基础/重载和重写.html">
            
                    
                    重载和重写.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.3" data-path="../基础/基础中的基础/显式声明无参构造方法的作用.html">
            
                <a href="../基础/基础中的基础/显式声明无参构造方法的作用.html">
            
                    
                    显式声明无参构造方法的作用.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.4" data-path="../基础/基础中的基础/构造方法有哪些特性.html">
            
                <a href="../基础/基础中的基础/构造方法有哪些特性.html">
            
                    
                    构造方法有哪些特性.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.5" data-path="../基础/基础中的基础/==和equal.html">
            
                <a href="../基础/基础中的基础/==和equal.html">
            
                    
                    ==和equal.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.6" data-path="../基础/基础中的基础/为什么要重写hashCode方法.html">
            
                <a href="../基础/基础中的基础/为什么要重写hashCode方法.html">
            
                    
                    为什么要重写hashCode方法.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.7" data-path="../基础/基础中的基础/接口和抽象类的区别.html">
            
                <a href="../基础/基础中的基础/接口和抽象类的区别.html">
            
                    
                    接口和抽象类的区别.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.8" data-path="../基础/基础中的基础/成员变量和局部变量.html">
            
                <a href="../基础/基础中的基础/成员变量和局部变量.html">
            
                    
                    成员变量和局部变量.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.9" data-path="../基础/基础中的基础/线程和进程.html">
            
                <a href="../基础/基础中的基础/线程和进程.html">
            
                    
                    线程和进程.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.10" data-path="../基础/基础中的基础/String和StringBuilder和StringBuffer.html">
            
                <a href="../基础/基础中的基础/String和StringBuilder和StringBuffer.html">
            
                    
                    String和StringBuilder和StringBuffer.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.3.2" data-path="../基础/面向对象和面向过程.html">
            
                <a href="../基础/面向对象和面向过程.html">
            
                    
                    面向对象和面向过程.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.3" data-path="../基础/封装继承多态.html">
            
                <a href="../基础/封装继承多态.html">
            
                    
                    封装继承多态.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.4" data-path="../基础/继承实现组合聚合关联依赖.html">
            
                <a href="../基础/继承实现组合聚合关联依赖.html">
            
                    
                    继承实现组合聚合关联依赖.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.5" data-path="../基础/耦合和内聚.html">
            
                <a href="../基础/耦合和内聚.html">
            
                    
                    耦合和内聚.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.6" data-path="../基础/面向接口设计基本原则.html">
            
                <a href="../基础/面向接口设计基本原则.html">
            
                    
                    面向接口设计基本原则.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.7" data-path="../基础/值传递和引用传递.html">
            
                <a href="../基础/值传递和引用传递.html">
            
                    
                    值传递和引用传递.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.8" data-path="../基础/实参与形参.html">
            
                <a href="../基础/实参与形参.html">
            
                    
                    实参与形参.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.9" data-path="../基础/深克隆&浅克隆.html">
            
                <a href="../基础/深克隆&浅克隆.html">
            
                    
                    深克隆&浅克隆.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.10" data-path="../基础/单分派&多分派.html">
            
                <a href="../基础/单分派&多分派.html">
            
                    
                    单分派&多分派.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.11" data-path="../基础/双重分派.html">
            
                <a href="../基础/双重分派.html">
            
                    
                    双重分派.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.12" data-path="../基础/Java中的引用.html">
            
                <a href="../基础/Java中的引用.html">
            
                    
                    Java中的引用.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.13" data-path="../基础/双亲委派机制.html">
            
                <a href="../基础/双亲委派机制.html">
            
                    
                    双亲委派机制.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.14" data-path="../基础/进制换算.html">
            
                <a href="../基础/进制换算.html">
            
                    
                    进制换算.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.15" data-path="../基础/OOA·OOD·OOP.html">
            
                <a href="../基础/OOA·OOD·OOP.html">
            
                    
                    OOA·OOD·OOP.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.16" data-path="../基础/简单看懂软件类图.html">
            
                <a href="../基础/简单看懂软件类图.html">
            
                    
                    简单看懂软件类图.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../底层/SUMMARY.html">
            
                <a href="../底层/SUMMARY.html">
            
                    
                    底层
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.4.1" data-path="../底层/字节码文件阅读.html">
            
                <a href="../底层/字节码文件阅读.html">
            
                    
                    字节码文件阅读.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../设计模式/SUMMARY.html">
            
                <a href="../设计模式/SUMMARY.html">
            
                    
                    设计模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.5.1" data-path="../设计模式/三种工厂模式对比与总结.html">
            
                <a href="../设计模式/三种工厂模式对比与总结.html">
            
                    
                    三种工厂模式对比与总结.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.2" data-path="../设计模式/创建型模式/SUMMARY.html">
            
                <a href="../设计模式/创建型模式/SUMMARY.html">
            
                    
                    创建型模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.5.2.1" data-path="../设计模式/创建型模式/单例模式.html">
            
                <a href="../设计模式/创建型模式/单例模式.html">
            
                    
                    单例模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.2.2" data-path="../设计模式/创建型模式/原型模式.html">
            
                <a href="../设计模式/创建型模式/原型模式.html">
            
                    
                    原型模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.2.3" data-path="../设计模式/创建型模式/工厂方法模式.html">
            
                <a href="../设计模式/创建型模式/工厂方法模式.html">
            
                    
                    工厂方法模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.2.4" data-path="../设计模式/创建型模式/建造者模式.html">
            
                <a href="../设计模式/创建型模式/建造者模式.html">
            
                    
                    建造者模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.2.5" data-path="../设计模式/创建型模式/抽象工厂模式.html">
            
                <a href="../设计模式/创建型模式/抽象工厂模式.html">
            
                    
                    抽象工厂模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.2.6" data-path="../设计模式/创建型模式/简单工厂模式.html">
            
                <a href="../设计模式/创建型模式/简单工厂模式.html">
            
                    
                    简单工厂模式.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.5.3" data-path="../设计模式/结构型模式/SUMMARY.html">
            
                <a href="../设计模式/结构型模式/SUMMARY.html">
            
                    
                    结构型模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.5.3.1" data-path="../设计模式/结构型模式/享元模式.html">
            
                <a href="../设计模式/结构型模式/享元模式.html">
            
                    
                    享元模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.3.2" data-path="../设计模式/结构型模式/代理模式.html">
            
                <a href="../设计模式/结构型模式/代理模式.html">
            
                    
                    代理模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.3.3" data-path="../设计模式/结构型模式/外观模式.html">
            
                <a href="../设计模式/结构型模式/外观模式.html">
            
                    
                    外观模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.3.4" data-path="../设计模式/结构型模式/桥接模式.html">
            
                <a href="../设计模式/结构型模式/桥接模式.html">
            
                    
                    桥接模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.3.5" data-path="../设计模式/结构型模式/组合模式.html">
            
                <a href="../设计模式/结构型模式/组合模式.html">
            
                    
                    组合模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.3.6" data-path="../设计模式/结构型模式/装饰者模式.html">
            
                <a href="../设计模式/结构型模式/装饰者模式.html">
            
                    
                    装饰者模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.3.7" data-path="../设计模式/结构型模式/适配器模式.html">
            
                <a href="../设计模式/结构型模式/适配器模式.html">
            
                    
                    适配器模式.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.5.4" data-path="../设计模式/行为型模式/SUMMARY.html">
            
                <a href="../设计模式/行为型模式/SUMMARY.html">
            
                    
                    行为型模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.5.4.1" data-path="../设计模式/行为型模式/命令模式.html">
            
                <a href="../设计模式/行为型模式/命令模式.html">
            
                    
                    命令模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4.2" data-path="../设计模式/行为型模式/委派模式.html">
            
                <a href="../设计模式/行为型模式/委派模式.html">
            
                    
                    委派模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4.3" data-path="../设计模式/行为型模式/模板方法模式.html">
            
                <a href="../设计模式/行为型模式/模板方法模式.html">
            
                    
                    模板方法模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4.4" data-path="../设计模式/行为型模式/状态模式.html">
            
                <a href="../设计模式/行为型模式/状态模式.html">
            
                    
                    状态模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4.5" data-path="../设计模式/行为型模式/策略模式.html">
            
                <a href="../设计模式/行为型模式/策略模式.html">
            
                    
                    策略模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4.6" data-path="../设计模式/行为型模式/观察者模式.html">
            
                <a href="../设计模式/行为型模式/观察者模式.html">
            
                    
                    观察者模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4.7" data-path="../设计模式/行为型模式/访问者模式.html">
            
                <a href="../设计模式/行为型模式/访问者模式.html">
            
                    
                    访问者模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4.8" data-path="../设计模式/行为型模式/责任链模式.html">
            
                <a href="../设计模式/行为型模式/责任链模式.html">
            
                    
                    责任链模式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4.9" data-path="../设计模式/行为型模式/迭代器模式.html">
            
                <a href="../设计模式/行为型模式/迭代器模式.html">
            
                    
                    迭代器模式.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../JVM/SUMMARY.html">
            
                <a href="../JVM/SUMMARY.html">
            
                    
                    JVM
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.6.1" data-path="../JVM/概念.html">
            
                <a href="../JVM/概念.html">
            
                    
                    概念.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6.2" data-path="../JVM/Class文件.html">
            
                <a href="../JVM/Class文件.html">
            
                    
                    Class文件.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6.3" data-path="../JVM/类加载机制.html">
            
                <a href="../JVM/类加载机制.html">
            
                    
                    类加载机制.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6.4" data-path="../JVM/运行时数据区.html">
            
                <a href="../JVM/运行时数据区.html">
            
                    
                    运行时数据区.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6.5" data-path="../JVM/垃圾收集.html">
            
                <a href="../JVM/垃圾收集.html">
            
                    
                    垃圾收集.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6.6" data-path="../JVM/运行时数据区_堆和方法区.html">
            
                <a href="../JVM/运行时数据区_堆和方法区.html">
            
                    
                    运行时数据区_堆和方法区.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../内置工具类/SUMMARY.html">
            
                <a href="../内置工具类/SUMMARY.html">
            
                    
                    内置工具类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.7.1" data-path="../内置工具类/Lock/SUMMARY.html">
            
                <a href="../内置工具类/Lock/SUMMARY.html">
            
                    
                    Lock
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.7.1.1" data-path="../内置工具类/Lock/可重入锁-ReentrantLock.html">
            
                <a href="../内置工具类/Lock/可重入锁-ReentrantLock.html">
            
                    
                    可重入锁-ReentrantLock.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.1.2" data-path="../内置工具类/Lock/读写锁-ReentrantReadWriteLock.html">
            
                <a href="../内置工具类/Lock/读写锁-ReentrantReadWriteLock.html">
            
                    
                    读写锁-ReentrantReadWriteLock.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.1.3" data-path="../内置工具类/Lock/闭锁-CountDownLatch.html">
            
                <a href="../内置工具类/Lock/闭锁-CountDownLatch.html">
            
                    
                    闭锁-CountDownLatch.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.1.4" data-path="../内置工具类/Lock/信号量-Semaphore.html">
            
                <a href="../内置工具类/Lock/信号量-Semaphore.html">
            
                    
                    信号量-Semaphore.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.1.5" data-path="../内置工具类/Lock/内存栅栏-CyclicBarrier.html">
            
                <a href="../内置工具类/Lock/内存栅栏-CyclicBarrier.html">
            
                    
                    内存栅栏-CyclicBarrier.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.7.2" data-path="../内置工具类/Collection/SUMMARY.html">
            
                <a href="../内置工具类/Collection/SUMMARY.html">
            
                    
                    Collection
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.7.2.1" data-path="../内置工具类/Collection/Blocking/SUMMARY.html">
            
                <a href="../内置工具类/Collection/Blocking/SUMMARY.html">
            
                    
                    Blocking
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.7.3" data-path="../内置工具类/监控系统文件变化-WatchService.html">
            
                <a href="../内置工具类/监控系统文件变化-WatchService.html">
            
                    
                    监控系统文件变化-WatchService.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.4" data-path="../内置工具类/简单遍历文件树-FileVisitor.html">
            
                <a href="../内置工具类/简单遍历文件树-FileVisitor.html">
            
                    
                    简单遍历文件树-FileVisitor.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.5" data-path="../内置工具类/自定义配置文件-Properties.html">
            
                <a href="../内置工具类/自定义配置文件-Properties.html">
            
                    
                    自定义配置文件-Properties.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="../线程/SUMMARY.html">
            
                <a href="../线程/SUMMARY.html">
            
                    
                    线程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.8.1" data-path="../线程/线程.html">
            
                <a href="../线程/线程.html">
            
                    
                    线程.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8.2" data-path="../线程/创建线程的4种方式.html">
            
                <a href="../线程/创建线程的4种方式.html">
            
                    
                    创建线程的4种方式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8.3" data-path="../线程/线程状态.html">
            
                <a href="../线程/线程状态.html">
            
                    
                    线程状态.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8.4" data-path="../线程/线程与中断.html">
            
                <a href="../线程/线程与中断.html">
            
                    
                    线程与中断.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8.5" data-path="../线程/线程细枝末梢的一点东西.html">
            
                <a href="../线程/线程细枝末梢的一点东西.html">
            
                    
                    线程细枝末梢的一点东西.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="../线程与锁/SUMMARY.html">
            
                <a href="../线程与锁/SUMMARY.html">
            
                    
                    线程与锁
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.9.1" data-path="../线程与锁/锁.html">
            
                <a href="../线程与锁/锁.html">
            
                    
                    锁.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2" data-path="../线程与锁/并发基础/SUMMARY.html">
            
                <a href="../线程与锁/并发基础/SUMMARY.html">
            
                    
                    并发基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.9.2.1" data-path="../线程与锁/并发基础/并发编程中的三个概念-原子性可见性有序性.html">
            
                <a href="../线程与锁/并发基础/并发编程中的三个概念-原子性可见性有序性.html">
            
                    
                    并发编程中的三个概念-原子性可见性有序性.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2.2" data-path="../线程与锁/并发基础/从硬件层面理解可见性问题.html">
            
                <a href="../线程与锁/并发基础/从硬件层面理解可见性问题.html">
            
                    
                    从硬件层面理解可见性问题.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2.3" data-path="../线程与锁/并发基础/指令重排.html">
            
                <a href="../线程与锁/并发基础/指令重排.html">
            
                    
                    指令重排.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2.4" data-path="../线程与锁/并发基础/JMM内存屏障.html">
            
                <a href="../线程与锁/并发基础/JMM内存屏障.html">
            
                    
                    JMM内存屏障.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2.5" data-path="../线程与锁/并发基础/总线锁和缓存锁定.html">
            
                <a href="../线程与锁/并发基础/总线锁和缓存锁定.html">
            
                    
                    总线锁和缓存锁定.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2.6" data-path="../线程与锁/并发基础/缓存行与缓存填充.html">
            
                <a href="../线程与锁/并发基础/缓存行与缓存填充.html">
            
                    
                    缓存行与缓存填充.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2.7" data-path="../线程与锁/并发基础/Java内存模型.html">
            
                <a href="../线程与锁/并发基础/Java内存模型.html">
            
                    
                    Java内存模型.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2.8" data-path="../线程与锁/并发基础/happens-before原则.html">
            
                <a href="../线程与锁/并发基础/happens-before原则.html">
            
                    
                    happens-before原则.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.2.9" data-path="../线程与锁/并发基础/关于底层的一些其他东西.html">
            
                <a href="../线程与锁/并发基础/关于底层的一些其他东西.html">
            
                    
                    关于底层的一些其他东西.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.9.3" data-path="../线程与锁/Volatile.html">
            
                <a href="../线程与锁/Volatile.html">
            
                    
                    Volatile.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4" data-path="../线程与锁/Synchronized/SUMMARY.html">
            
                <a href="../线程与锁/Synchronized/SUMMARY.html">
            
                    
                    Synchronized
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.9.4.1" data-path="../线程与锁/Synchronized/从字节码和对象头理解synchronized.html">
            
                <a href="../线程与锁/Synchronized/从字节码和对象头理解synchronized.html">
            
                    
                    从字节码和对象头理解synchronized.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4.2" data-path="../线程与锁/Synchronized/synchronized的内存语义.html">
            
                <a href="../线程与锁/Synchronized/synchronized的内存语义.html">
            
                    
                    synchronized的内存语义.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4.3" data-path="../线程与锁/Synchronized/synchronized的种类与优化.html">
            
                <a href="../线程与锁/Synchronized/synchronized的种类与优化.html">
            
                    
                    synchronized的种类与优化.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4.4" data-path="../线程与锁/Synchronized/LockRecord和Monitor.html">
            
                <a href="../线程与锁/Synchronized/LockRecord和Monitor.html">
            
                    
                    LockRecord和Monitor.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4.5" data-path="../线程与锁/Synchronized/偏向锁.html">
            
                <a href="../线程与锁/Synchronized/偏向锁.html">
            
                    
                    偏向锁.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4.6" data-path="../线程与锁/Synchronized/轻量级锁.html">
            
                <a href="../线程与锁/Synchronized/轻量级锁.html">
            
                    
                    轻量级锁.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4.7" data-path="../线程与锁/Synchronized/重量级锁.html">
            
                <a href="../线程与锁/Synchronized/重量级锁.html">
            
                    
                    重量级锁.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4.8" data-path="../线程与锁/Synchronized/synchronized一些关键点.html">
            
                <a href="../线程与锁/Synchronized/synchronized一些关键点.html">
            
                    
                    synchronized一些关键点.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.4.9" data-path="../线程与锁/Synchronized/wait,notify,notifyAll.html">
            
                <a href="../线程与锁/Synchronized/wait,notify,notifyAll.html">
            
                    
                    wait,notify,notifyAll.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.9.5" data-path="../线程与锁/CAS.html">
            
                <a href="../线程与锁/CAS.html">
            
                    
                    CAS.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.6" data-path="../线程与锁/Ticket_CLH_MCS.html">
            
                <a href="../线程与锁/Ticket_CLH_MCS.html">
            
                    
                    Ticket_CLH_MCS.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.7" data-path="../线程与锁/Java并发基石/SUMMARY.html">
            
                <a href="../线程与锁/Java并发基石/SUMMARY.html">
            
                    
                    Java并发基石
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.9.7.1" data-path="../线程与锁/Java并发基石/Lock接口.html">
            
                <a href="../线程与锁/Java并发基石/Lock接口.html">
            
                    
                    Lock接口.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.7.2" data-path="../线程与锁/Java并发基石/AQS.html">
            
                <a href="../线程与锁/Java并发基石/AQS.html">
            
                    
                    AQS.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9.7.3" data-path="../线程与锁/Java并发基石/Condition接口.html">
            
                <a href="../线程与锁/Java并发基石/Condition接口.html">
            
                    
                    Condition接口.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="SUMMARY.html">
            
                <a href="SUMMARY.html">
            
                    
                    线程池
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.4.10.1" data-path="ThreadPoolExecutor.html">
            
                <a href="ThreadPoolExecutor.html">
            
                    
                    ThreadPoolExecutor.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10.2" data-path="线程池.html">
            
                <a href="线程池.html">
            
                    
                    线程池.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../工具/SUMMARY.html">
            
                <a href="../../工具/SUMMARY.html">
            
                    
                    工具
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../../工具/docker/SUMMARY.html">
            
                <a href="../../工具/docker/SUMMARY.html">
            
                    
                    docker
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1.1" data-path="../../工具/docker/安装升级卸载/SUMMARY.html">
            
                <a href="../../工具/docker/安装升级卸载/SUMMARY.html">
            
                    
                    安装升级卸载
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1.1.1" data-path="../../工具/docker/安装升级卸载/安装.html">
            
                <a href="../../工具/docker/安装升级卸载/安装.html">
            
                    
                    安装.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.1.2" data-path="../../工具/docker/安装升级卸载/win安装.html">
            
                <a href="../../工具/docker/安装升级卸载/win安装.html">
            
                    
                    win安装.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.1.3" data-path="../../工具/docker/安装升级卸载/docker卸载.html">
            
                <a href="../../工具/docker/安装升级卸载/docker卸载.html">
            
                    
                    docker卸载.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.1.4" data-path="../../工具/docker/安装升级卸载/升级_centOS.html">
            
                <a href="../../工具/docker/安装升级卸载/升级_centOS.html">
            
                    
                    升级_centOS.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.1.2" data-path="../../工具/docker/常用命令.html">
            
                <a href="../../工具/docker/常用命令.html">
            
                    
                    常用命令.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.3" data-path="../../工具/docker/更换镜像源.html">
            
                <a href="../../工具/docker/更换镜像源.html">
            
                    
                    更换镜像源.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.4" data-path="../../工具/docker/配置.html">
            
                <a href="../../工具/docker/配置.html">
            
                    
                    配置.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5" data-path="../../工具/docker/镜像/SUMMARY.html">
            
                <a href="../../工具/docker/镜像/SUMMARY.html">
            
                    
                    镜像
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1.5.1" data-path="../../工具/docker/镜像/什么是镜像.html">
            
                <a href="../../工具/docker/镜像/什么是镜像.html">
            
                    
                    什么是镜像.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5.2" data-path="../../工具/docker/镜像/自定义镜像.html">
            
                <a href="../../工具/docker/镜像/自定义镜像.html">
            
                    
                    自定义镜像.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5.3" data-path="../../工具/docker/镜像/自定义镜像2-多阶段构建.html">
            
                <a href="../../工具/docker/镜像/自定义镜像2-多阶段构建.html">
            
                    
                    自定义镜像2-多阶段构建.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5.4" data-path="../../工具/docker/镜像/关于sh和bash.html">
            
                <a href="../../工具/docker/镜像/关于sh和bash.html">
            
                    
                    关于sh和bash.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5.5" data-path="../../工具/docker/镜像/dockerfile/SUMMARY.html">
            
                <a href="../../工具/docker/镜像/dockerfile/SUMMARY.html">
            
                    
                    dockerfile
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1.5.5.1" data-path="../../工具/docker/镜像/dockerfile/gosu.html">
            
                <a href="../../工具/docker/镜像/dockerfile/gosu.html">
            
                    
                    gosu.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5.5.2" data-path="../../工具/docker/镜像/dockerfile/jdk镜像.html">
            
                <a href="../../工具/docker/镜像/dockerfile/jdk镜像.html">
            
                    
                    jdk镜像.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5.5.3" data-path="../../工具/docker/镜像/dockerfile/jenkins+maven.html">
            
                <a href="../../工具/docker/镜像/dockerfile/jenkins+maven.html">
            
                    
                    jenkins+maven.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5.5.4" data-path="../../工具/docker/镜像/dockerfile/SpringBoot服务镜像.html">
            
                <a href="../../工具/docker/镜像/dockerfile/SpringBoot服务镜像.html">
            
                    
                    SpringBoot服务镜像.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.1.6" data-path="../../工具/docker/容器/SUMMARY.html">
            
                <a href="../../工具/docker/容器/SUMMARY.html">
            
                    
                    容器
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1.6.1" data-path="../../工具/docker/容器/什么是容器.html">
            
                <a href="../../工具/docker/容器/什么是容器.html">
            
                    
                    什么是容器.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.6.2" data-path="../../工具/docker/容器/创建容器.html">
            
                <a href="../../工具/docker/容器/创建容器.html">
            
                    
                    创建容器.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.6.3" data-path="../../工具/docker/容器/限制容器内存.html">
            
                <a href="../../工具/docker/容器/限制容器内存.html">
            
                    
                    限制容器内存.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.1.7" data-path="../../工具/docker/问题合集.html">
            
                <a href="../../工具/docker/问题合集.html">
            
                    
                    问题合集.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../../工具/elasticsearch/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/SUMMARY.html">
            
                    
                    elasticsearch
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.1" data-path="../../工具/elasticsearch/总.html">
            
                <a href="../../工具/elasticsearch/总.html">
            
                    
                    总.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.2" data-path="../../工具/elasticsearch/ElasticStack.html">
            
                <a href="../../工具/elasticsearch/ElasticStack.html">
            
                    
                    ElasticStack.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.3" data-path="../../工具/elasticsearch/Elasticsearch源码环境搭建.html">
            
                <a href="../../工具/elasticsearch/Elasticsearch源码环境搭建.html">
            
                    
                    Elasticsearch源码环境搭建.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.4" data-path="../../工具/elasticsearch/Elasticsearch介绍.html">
            
                <a href="../../工具/elasticsearch/Elasticsearch介绍.html">
            
                    
                    Elasticsearch介绍.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.5" data-path="../../工具/elasticsearch/索引篇/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/索引篇/SUMMARY.html">
            
                    
                    索引篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.5.1" data-path="../../工具/elasticsearch/索引篇/索引介绍与创建.html">
            
                <a href="../../工具/elasticsearch/索引篇/索引介绍与创建.html">
            
                    
                    索引介绍与创建.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.5.2" data-path="../../工具/elasticsearch/索引篇/索引的结构类型.html">
            
                <a href="../../工具/elasticsearch/索引篇/索引的结构类型.html">
            
                    
                    索引的结构类型.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.5.3" data-path="../../工具/elasticsearch/索引篇/Mapping.html">
            
                <a href="../../工具/elasticsearch/索引篇/Mapping.html">
            
                    
                    Mapping.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.5.4" data-path="../../工具/elasticsearch/索引篇/常用字段类型.html">
            
                <a href="../../工具/elasticsearch/索引篇/常用字段类型.html">
            
                    
                    常用字段类型.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.5.5" data-path="../../工具/elasticsearch/索引篇/特殊字段类型.html">
            
                <a href="../../工具/elasticsearch/索引篇/特殊字段类型.html">
            
                    
                    特殊字段类型.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.5.6" data-path="../../工具/elasticsearch/索引篇/字段类型属性.html">
            
                <a href="../../工具/elasticsearch/索引篇/字段类型属性.html">
            
                    
                    字段类型属性.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.5.7" data-path="../../工具/elasticsearch/索引篇/别名.html">
            
                <a href="../../工具/elasticsearch/索引篇/别名.html">
            
                    
                    别名.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2.6" data-path="../../工具/elasticsearch/查询篇/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/查询篇/SUMMARY.html">
            
                    
                    查询篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.6.1" data-path="../../工具/elasticsearch/查询篇/SearchTemplate查询模板.html">
            
                <a href="../../工具/elasticsearch/查询篇/SearchTemplate查询模板.html">
            
                    
                    SearchTemplate查询模板.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.2" data-path="../../工具/elasticsearch/查询篇/简单查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/简单查询.html">
            
                    
                    简单查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.3" data-path="../../工具/elasticsearch/查询篇/简单查询2-分页.html">
            
                <a href="../../工具/elasticsearch/查询篇/简单查询2-分页.html">
            
                    
                    简单查询2-分页.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.4" data-path="../../工具/elasticsearch/查询篇/异步查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/异步查询.html">
            
                    
                    异步查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.5" data-path="../../工具/elasticsearch/查询篇/复合,嵌套,分值,查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/复合,嵌套,分值,查询.html">
            
                    
                    复合,嵌套,分值,查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6" data-path="../../工具/elasticsearch/查询篇/常用查询函数/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/SUMMARY.html">
            
                    
                    常用查询函数
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.6.6.1" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Match文本分词查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Match文本分词查询.html">
            
                    
                    Match文本分词查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.2" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Term词项查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Term词项查询.html">
            
                    
                    Term词项查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.3" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Wildcard通配符查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Wildcard通配符查询.html">
            
                    
                    Wildcard通配符查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.4" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Fuzzy容错查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Fuzzy容错查询.html">
            
                    
                    Fuzzy容错查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.5" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Prefix前缀查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Prefix前缀查询.html">
            
                    
                    Prefix前缀查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.6" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Range范围查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Range范围查询.html">
            
                    
                    Range范围查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.7" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Exists存在查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Exists存在查询.html">
            
                    
                    Exists存在查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.8" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Regexp正则查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Regexp正则查询.html">
            
                    
                    Regexp正则查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.9" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Suggesters启发式查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Suggesters启发式查询.html">
            
                    
                    Suggesters启发式查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.6.10" data-path="../../工具/elasticsearch/查询篇/常用查询函数/Span跨度查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/常用查询函数/Span跨度查询.html">
            
                    
                    Span跨度查询.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.7" data-path="../../工具/elasticsearch/查询篇/深入分词.html">
            
                <a href="../../工具/elasticsearch/查询篇/深入分词.html">
            
                    
                    深入分词.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.8" data-path="../../工具/elasticsearch/查询篇/Suggesters启发式查询.html">
            
                <a href="../../工具/elasticsearch/查询篇/Suggesters启发式查询.html">
            
                    
                    Suggesters启发式查询.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.9" data-path="../../工具/elasticsearch/查询篇/通用属性/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/查询篇/通用属性/SUMMARY.html">
            
                    
                    通用属性
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.6.9.1" data-path="../../工具/elasticsearch/查询篇/通用属性/fuzziness模糊.html">
            
                <a href="../../工具/elasticsearch/查询篇/通用属性/fuzziness模糊.html">
            
                    
                    fuzziness模糊.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.10" data-path="../../工具/elasticsearch/查询篇/Sort排序/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/查询篇/Sort排序/SUMMARY.html">
            
                    
                    Sort排序
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.6.10.1" data-path="../../工具/elasticsearch/查询篇/Sort排序/ES中的排序.html">
            
                <a href="../../工具/elasticsearch/查询篇/Sort排序/ES中的排序.html">
            
                    
                    ES中的排序.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.10.2" data-path="../../工具/elasticsearch/查询篇/Sort排序/数据写入时排序.html">
            
                <a href="../../工具/elasticsearch/查询篇/Sort排序/数据写入时排序.html">
            
                    
                    数据写入时排序.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6.10.3" data-path="../../工具/elasticsearch/查询篇/Sort排序/Sort排序.html">
            
                <a href="../../工具/elasticsearch/查询篇/Sort排序/Sort排序.html">
            
                    
                    Sort排序.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2.7" data-path="../../工具/elasticsearch/数据篇/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/数据篇/SUMMARY.html">
            
                    
                    数据篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.7.1" data-path="../../工具/elasticsearch/数据篇/增删改.html">
            
                <a href="../../工具/elasticsearch/数据篇/增删改.html">
            
                    
                    增删改.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.7.2" data-path="../../工具/elasticsearch/数据篇/批量操作-Bulk.html">
            
                <a href="../../工具/elasticsearch/数据篇/批量操作-Bulk.html">
            
                    
                    批量操作-Bulk.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.7.3" data-path="../../工具/elasticsearch/数据篇/管道-ingest_pipeline.html">
            
                <a href="../../工具/elasticsearch/数据篇/管道-ingest_pipeline.html">
            
                    
                    管道-ingest_pipeline.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.7.4" data-path="../../工具/elasticsearch/数据篇/重建索引-reindex.html">
            
                <a href="../../工具/elasticsearch/数据篇/重建索引-reindex.html">
            
                    
                    重建索引-reindex.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2.8" data-path="../../工具/elasticsearch/聚合篇/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/聚合篇/SUMMARY.html">
            
                    
                    聚合篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.8.1" data-path="../../工具/elasticsearch/聚合篇/Aggregations.html">
            
                <a href="../../工具/elasticsearch/聚合篇/Aggregations.html">
            
                    
                    Aggregations.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.8.2" data-path="../../工具/elasticsearch/聚合篇/metric数值指标聚合.html">
            
                <a href="../../工具/elasticsearch/聚合篇/metric数值指标聚合.html">
            
                    
                    metric数值指标聚合.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.8.3" data-path="../../工具/elasticsearch/聚合篇/bucket分桶聚合.html">
            
                <a href="../../工具/elasticsearch/聚合篇/bucket分桶聚合.html">
            
                    
                    bucket分桶聚合.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.8.4" data-path="../../工具/elasticsearch/聚合篇/bucket分桶聚合2.html">
            
                <a href="../../工具/elasticsearch/聚合篇/bucket分桶聚合2.html">
            
                    
                    bucket分桶聚合2.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.8.5" data-path="../../工具/elasticsearch/聚合篇/pipeline二次聚合.html">
            
                <a href="../../工具/elasticsearch/聚合篇/pipeline二次聚合.html">
            
                    
                    pipeline二次聚合.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2.9" data-path="../../工具/elasticsearch/MaterializedView物化视图.html">
            
                <a href="../../工具/elasticsearch/MaterializedView物化视图.html">
            
                    
                    MaterializedView物化视图.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.10" data-path="../../工具/elasticsearch/集群篇/SUMMARY.html">
            
                <a href="../../工具/elasticsearch/集群篇/SUMMARY.html">
            
                    
                    集群篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.10.1" data-path="../../工具/elasticsearch/集群篇/Elasticsearch集群介绍.html">
            
                <a href="../../工具/elasticsearch/集群篇/Elasticsearch集群介绍.html">
            
                    
                    Elasticsearch集群介绍.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.10.2" data-path="../../工具/elasticsearch/集群篇/跨集群操作.html">
            
                <a href="../../工具/elasticsearch/集群篇/跨集群操作.html">
            
                    
                    跨集群操作.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.10.3" data-path="../../工具/elasticsearch/集群篇/集群分片平衡配置.html">
            
                <a href="../../工具/elasticsearch/集群篇/集群分片平衡配置.html">
            
                    
                    集群分片平衡配置.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.10.4" data-path="../../工具/elasticsearch/集群篇/集群恢复gateway.html">
            
                <a href="../../工具/elasticsearch/集群篇/集群恢复gateway.html">
            
                    
                    集群恢复gateway.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.10.5" data-path="../../工具/elasticsearch/集群篇/集群扩容.html">
            
                <a href="../../工具/elasticsearch/集群篇/集群扩容.html">
            
                    
                    集群扩容.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.10.6" data-path="../../工具/elasticsearch/集群篇/集群数据静态迁移dangling.html">
            
                <a href="../../工具/elasticsearch/集群篇/集群数据静态迁移dangling.html">
            
                    
                    集群数据静态迁移dangling.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2.11" data-path="../../工具/elasticsearch/在ES中使用SQL.html">
            
                <a href="../../工具/elasticsearch/在ES中使用SQL.html">
            
                    
                    在ES中使用SQL.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.12" data-path="../../工具/elasticsearch/Script脚本.html">
            
                <a href="../../工具/elasticsearch/Script脚本.html">
            
                    
                    Script脚本.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.13" data-path="../../工具/elasticsearch/ECE认证主要知识点.html">
            
                <a href="../../工具/elasticsearch/ECE认证主要知识点.html">
            
                    
                    ECE认证主要知识点.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../../工具/jenkins/SUMMARY.html">
            
                <a href="../../工具/jenkins/SUMMARY.html">
            
                    
                    jenkins
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.3.1" data-path="../../工具/jenkins/子进程后台运行.html">
            
                <a href="../../工具/jenkins/子进程后台运行.html">
            
                    
                    子进程后台运行.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3.2" data-path="../../工具/jenkins/安装.html">
            
                <a href="../../工具/jenkins/安装.html">
            
                    
                    安装.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3.3" data-path="../../工具/jenkins/定时构建.html">
            
                <a href="../../工具/jenkins/定时构建.html">
            
                    
                    定时构建.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3.4" data-path="../../工具/jenkins/问题.html">
            
                <a href="../../工具/jenkins/问题.html">
            
                    
                    问题.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../../工具/Kafka/SUMMARY.html">
            
                <a href="../../工具/Kafka/SUMMARY.html">
            
                    
                    Kafka
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.4.1" data-path="../../工具/Kafka/简介.html">
            
                <a href="../../工具/Kafka/简介.html">
            
                    
                    简介.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.2" data-path="../../工具/Kafka/架构.html">
            
                <a href="../../工具/Kafka/架构.html">
            
                    
                    架构.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.3" data-path="../../工具/Kafka/分区和副本.html">
            
                <a href="../../工具/Kafka/分区和副本.html">
            
                    
                    分区和副本.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.4" data-path="../../工具/Kafka/segment.html">
            
                <a href="../../工具/Kafka/segment.html">
            
                    
                    segment.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.5" data-path="../../工具/Kafka/offset维护与更新.html">
            
                <a href="../../工具/Kafka/offset维护与更新.html">
            
                    
                    offset维护与更新.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.6" data-path="../../工具/Kafka/副本间的选举与同步.html">
            
                <a href="../../工具/Kafka/副本间的选举与同步.html">
            
                    
                    副本间的选举与同步.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.7" data-path="../../工具/Kafka/Rebalance.html">
            
                <a href="../../工具/Kafka/Rebalance.html">
            
                    
                    Rebalance.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.8" data-path="../../工具/Kafka/拦截器.html">
            
                <a href="../../工具/Kafka/拦截器.html">
            
                    
                    拦截器.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.9" data-path="../../工具/Kafka/序列化器.html">
            
                <a href="../../工具/Kafka/序列化器.html">
            
                    
                    序列化器.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.10" data-path="../../工具/Kafka/producer发送消息流程.html">
            
                <a href="../../工具/Kafka/producer发送消息流程.html">
            
                    
                    producer发送消息流程.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.11" data-path="../../工具/Kafka/无消息丢失配置.html">
            
                <a href="../../工具/Kafka/无消息丢失配置.html">
            
                    
                    无消息丢失配置.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.12" data-path="../../工具/Kafka/Untitled.html">
            
                <a href="../../工具/Kafka/Untitled.html">
            
                    
                    Untitled.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.13" data-path="../../工具/Kafka/常见问题.html">
            
                <a href="../../工具/Kafka/常见问题.html">
            
                    
                    常见问题.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.14" data-path="../../工具/Kafka/幂等消息与事务消息.html">
            
                <a href="../../工具/Kafka/幂等消息与事务消息.html">
            
                    
                    幂等消息与事务消息.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../../工具/MQ/SUMMARY.html">
            
                <a href="../../工具/MQ/SUMMARY.html">
            
                    
                    MQ
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.1" data-path="../../工具/MQ/什么是MQ.html">
            
                <a href="../../工具/MQ/什么是MQ.html">
            
                    
                    什么是MQ.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.2" data-path="../../工具/MQ/AMQP协议.html">
            
                <a href="../../工具/MQ/AMQP协议.html">
            
                    
                    AMQP协议.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3" data-path="../../工具/MQ/rabbitMQ/SUMMARY.html">
            
                <a href="../../工具/MQ/rabbitMQ/SUMMARY.html">
            
                    
                    rabbitMQ
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.3.1" data-path="../../工具/MQ/rabbitMQ/rabbitMQ简介.html">
            
                <a href="../../工具/MQ/rabbitMQ/rabbitMQ简介.html">
            
                    
                    rabbitMQ简介.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.2" data-path="../../工具/MQ/rabbitMQ/安装.html">
            
                <a href="../../工具/MQ/rabbitMQ/安装.html">
            
                    
                    安装.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.3" data-path="../../工具/MQ/rabbitMQ/配置文件.html">
            
                <a href="../../工具/MQ/rabbitMQ/配置文件.html">
            
                    
                    配置文件.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.4" data-path="../../工具/MQ/rabbitMQ/常用命令.html">
            
                <a href="../../工具/MQ/rabbitMQ/常用命令.html">
            
                    
                    常用命令.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.5" data-path="../../工具/MQ/rabbitMQ/VirtualHosts.html">
            
                <a href="../../工具/MQ/rabbitMQ/VirtualHosts.html">
            
                    
                    VirtualHosts.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.6" data-path="../../工具/MQ/rabbitMQ/Exchange/SUMMARY.html">
            
                <a href="../../工具/MQ/rabbitMQ/Exchange/SUMMARY.html">
            
                    
                    Exchange
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.3.6.1" data-path="../../工具/MQ/rabbitMQ/Exchange/Exchange.html">
            
                <a href="../../工具/MQ/rabbitMQ/Exchange/Exchange.html">
            
                    
                    Exchange.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.6.2" data-path="../../工具/MQ/rabbitMQ/Exchange/Direct示例代码-旧API.html">
            
                <a href="../../工具/MQ/rabbitMQ/Exchange/Direct示例代码-旧API.html">
            
                    
                    Direct示例代码-旧API.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.6.3" data-path="../../工具/MQ/rabbitMQ/Exchange/Fanout示例代码-新API.html">
            
                <a href="../../工具/MQ/rabbitMQ/Exchange/Fanout示例代码-新API.html">
            
                    
                    Fanout示例代码-新API.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.7" data-path="../../工具/MQ/rabbitMQ/关于绑定.html">
            
                <a href="../../工具/MQ/rabbitMQ/关于绑定.html">
            
                    
                    关于绑定.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.8" data-path="../../工具/MQ/rabbitMQ/Message属性详解-BasicProperties.html">
            
                <a href="../../工具/MQ/rabbitMQ/Message属性详解-BasicProperties.html">
            
                    
                    Message属性详解-BasicProperties.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.9" data-path="../../工具/MQ/rabbitMQ/高级特性/SUMMARY.html">
            
                <a href="../../工具/MQ/rabbitMQ/高级特性/SUMMARY.html">
            
                    
                    高级特性
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.3.9.1" data-path="../../工具/MQ/rabbitMQ/高级特性/消息限流与重回队列.html">
            
                <a href="../../工具/MQ/rabbitMQ/高级特性/消息限流与重回队列.html">
            
                    
                    消息限流与重回队列.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.9.2" data-path="../../工具/MQ/rabbitMQ/高级特性/事务机制.html">
            
                <a href="../../工具/MQ/rabbitMQ/高级特性/事务机制.html">
            
                    
                    事务机制.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.9.3" data-path="../../工具/MQ/rabbitMQ/高级特性/Confirm确认消息.html">
            
                <a href="../../工具/MQ/rabbitMQ/高级特性/Confirm确认消息.html">
            
                    
                    Confirm确认消息.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.9.4" data-path="../../工具/MQ/rabbitMQ/高级特性/Return消息机制.html">
            
                <a href="../../工具/MQ/rabbitMQ/高级特性/Return消息机制.html">
            
                    
                    Return消息机制.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.9.5" data-path="../../工具/MQ/rabbitMQ/高级特性/TTL与死信队列.html">
            
                <a href="../../工具/MQ/rabbitMQ/高级特性/TTL与死信队列.html">
            
                    
                    TTL与死信队列.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.10" data-path="../../工具/MQ/rabbitMQ/解决方案/SUMMARY.html">
            
                <a href="../../工具/MQ/rabbitMQ/解决方案/SUMMARY.html">
            
                    
                    解决方案
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.3.10.1" data-path="../../工具/MQ/rabbitMQ/解决方案/幂等.html">
            
                <a href="../../工具/MQ/rabbitMQ/解决方案/幂等.html">
            
                    
                    幂等.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.10.2" data-path="../../工具/MQ/rabbitMQ/解决方案/确保消息投递.html">
            
                <a href="../../工具/MQ/rabbitMQ/解决方案/确保消息投递.html">
            
                    
                    确保消息投递.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3.10.3" data-path="../../工具/MQ/rabbitMQ/解决方案/顺序消费.html">
            
                <a href="../../工具/MQ/rabbitMQ/解决方案/顺序消费.html">
            
                    
                    顺序消费.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../../工具/MyBatis/SUMMARY.html">
            
                <a href="../../工具/MyBatis/SUMMARY.html">
            
                    
                    MyBatis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.6.1" data-path="../../工具/MyBatis/constructor注入.html">
            
                <a href="../../工具/MyBatis/constructor注入.html">
            
                    
                    constructor注入.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6.2" data-path="../../工具/MyBatis/objectFactory.html">
            
                <a href="../../工具/MyBatis/objectFactory.html">
            
                    
                    objectFactory.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6.3" data-path="../../工具/MyBatis/typeAliases.html">
            
                <a href="../../工具/MyBatis/typeAliases.html">
            
                    
                    typeAliases.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6.4" data-path="../../工具/MyBatis/typeHandlers.html">
            
                <a href="../../工具/MyBatis/typeHandlers.html">
            
                    
                    typeHandlers.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6.5" data-path="../../工具/MyBatis/原生配置之mappers.html">
            
                <a href="../../工具/MyBatis/原生配置之mappers.html">
            
                    
                    原生配置之mappers.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6.6" data-path="../../工具/MyBatis/嵌套映射.html">
            
                <a href="../../工具/MyBatis/嵌套映射.html">
            
                    
                    嵌套映射.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="../../工具/mycat/SUMMARY.html">
            
                <a href="../../工具/mycat/SUMMARY.html">
            
                    
                    mycat
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.7.1" data-path="../../工具/mycat/垂直切分&水平切分.html">
            
                <a href="../../工具/mycat/垂直切分&水平切分.html">
            
                    
                    垂直切分&水平切分.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="../../工具/Mysql/SUMMARY.html">
            
                <a href="../../工具/Mysql/SUMMARY.html">
            
                    
                    Mysql
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.8.1" data-path="../../工具/Mysql/BufferPool.html">
            
                <a href="../../工具/Mysql/BufferPool.html">
            
                    
                    BufferPool.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.2" data-path="../../工具/Mysql/RedoLog和UndoLog.html">
            
                <a href="../../工具/Mysql/RedoLog和UndoLog.html">
            
                    
                    RedoLog和UndoLog.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.3" data-path="../../工具/Mysql/一条语句的执行流程.html">
            
                <a href="../../工具/Mysql/一条语句的执行流程.html">
            
                    
                    一条语句的执行流程.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.4" data-path="../../工具/Mysql/优化.html">
            
                <a href="../../工具/Mysql/优化.html">
            
                    
                    优化.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.5" data-path="../../工具/Mysql/储存引擎.html">
            
                <a href="../../工具/Mysql/储存引擎.html">
            
                    
                    储存引擎.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.6" data-path="../../工具/Mysql/索引.html">
            
                <a href="../../工具/Mysql/索引.html">
            
                    
                    索引.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="../../工具/nosql/SUMMARY.html">
            
                <a href="../../工具/nosql/SUMMARY.html">
            
                    
                    nosql
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.1" data-path="../../工具/nosql/nosql与CAP.html">
            
                <a href="../../工具/nosql/nosql与CAP.html">
            
                    
                    nosql与CAP.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2" data-path="../../工具/nosql/redis/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/SUMMARY.html">
            
                    
                    redis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.1" data-path="../../工具/nosql/redis/redis安装.html">
            
                <a href="../../工具/nosql/redis/redis安装.html">
            
                    
                    redis安装.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.2" data-path="../../工具/nosql/redis/redis配置.html">
            
                <a href="../../工具/nosql/redis/redis配置.html">
            
                    
                    redis配置.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.3" data-path="../../工具/nosql/redis/命令/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/命令/SUMMARY.html">
            
                    
                    命令
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.3.1" data-path="../../工具/nosql/redis/命令/redis常用命令.html">
            
                <a href="../../工具/nosql/redis/命令/redis常用命令.html">
            
                    
                    redis常用命令.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.3.2" data-path="../../工具/nosql/redis/命令/列表命令.html">
            
                <a href="../../工具/nosql/redis/命令/列表命令.html">
            
                    
                    列表命令.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.3.3" data-path="../../工具/nosql/redis/命令/哈希命令.html">
            
                <a href="../../工具/nosql/redis/命令/哈希命令.html">
            
                    
                    哈希命令.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.3.4" data-path="../../工具/nosql/redis/命令/字符串命令.html">
            
                <a href="../../工具/nosql/redis/命令/字符串命令.html">
            
                    
                    字符串命令.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.3.5" data-path="../../工具/nosql/redis/命令/集合命令.html">
            
                <a href="../../工具/nosql/redis/命令/集合命令.html">
            
                    
                    集合命令.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.4" data-path="../../工具/nosql/redis/redis数据结构和内部编码.html">
            
                <a href="../../工具/nosql/redis/redis数据结构和内部编码.html">
            
                    
                    redis数据结构和内部编码.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.5" data-path="../../工具/nosql/redis/redis工具/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/redis工具/SUMMARY.html">
            
                    
                    redis工具
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.5.1" data-path="../../工具/nosql/redis/redis工具/GEO.html">
            
                <a href="../../工具/nosql/redis/redis工具/GEO.html">
            
                    
                    GEO.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.5.2" data-path="../../工具/nosql/redis/redis工具/Hyperloglog.html">
            
                <a href="../../工具/nosql/redis/redis工具/Hyperloglog.html">
            
                    
                    Hyperloglog.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.5.3" data-path="../../工具/nosql/redis/redis工具/位图-Bitmap.html">
            
                <a href="../../工具/nosql/redis/redis工具/位图-Bitmap.html">
            
                    
                    位图-Bitmap.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.5.4" data-path="../../工具/nosql/redis/redis工具/发布订阅功能.html">
            
                <a href="../../工具/nosql/redis/redis工具/发布订阅功能.html">
            
                    
                    发布订阅功能.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.5.5" data-path="../../工具/nosql/redis/redis工具/慢查询记录.html">
            
                <a href="../../工具/nosql/redis/redis工具/慢查询记录.html">
            
                    
                    慢查询记录.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.5.6" data-path="../../工具/nosql/redis/redis工具/管道.html">
            
                <a href="../../工具/nosql/redis/redis工具/管道.html">
            
                    
                    管道.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.6" data-path="../../工具/nosql/redis/持久化/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/持久化/SUMMARY.html">
            
                    
                    持久化
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.6.1" data-path="../../工具/nosql/redis/持久化/AOF+RDB.html">
            
                <a href="../../工具/nosql/redis/持久化/AOF+RDB.html">
            
                    
                    AOF+RDB.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.6.2" data-path="../../工具/nosql/redis/持久化/AOF.html">
            
                <a href="../../工具/nosql/redis/持久化/AOF.html">
            
                    
                    AOF.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.6.3" data-path="../../工具/nosql/redis/持久化/RDB.html">
            
                <a href="../../工具/nosql/redis/持久化/RDB.html">
            
                    
                    RDB.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.6.4" data-path="../../工具/nosql/redis/持久化/RDB与AOF的配置设置.html">
            
                <a href="../../工具/nosql/redis/持久化/RDB与AOF的配置设置.html">
            
                    
                    RDB与AOF的配置设置.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.6.5" data-path="../../工具/nosql/redis/持久化/RDB和AOF的区别.html">
            
                <a href="../../工具/nosql/redis/持久化/RDB和AOF的区别.html">
            
                    
                    RDB和AOF的区别.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.6.6" data-path="../../工具/nosql/redis/持久化/RDB性能分析.html">
            
                <a href="../../工具/nosql/redis/持久化/RDB性能分析.html">
            
                    
                    RDB性能分析.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7" data-path="../../工具/nosql/redis/主从配置/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/主从配置/SUMMARY.html">
            
                    
                    主从配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.7.1" data-path="../../工具/nosql/redis/主从配置/主从实现.html">
            
                <a href="../../工具/nosql/redis/主从配置/主从实现.html">
            
                    
                    主从实现.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7.2" data-path="../../工具/nosql/redis/主从配置/配置.html">
            
                <a href="../../工具/nosql/redis/主从配置/配置.html">
            
                    
                    配置.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7.3" data-path="../../工具/nosql/redis/主从配置/redis主从复制.html">
            
                <a href="../../工具/nosql/redis/主从配置/redis主从复制.html">
            
                    
                    redis主从复制.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7.4" data-path="../../工具/nosql/redis/主从配置/runId和偏移量.html">
            
                <a href="../../工具/nosql/redis/主从配置/runId和偏移量.html">
            
                    
                    runId和偏移量.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7.5" data-path="../../工具/nosql/redis/主从配置/sentinel/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/主从配置/sentinel/SUMMARY.html">
            
                    
                    sentinel
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.7.5.1" data-path="../../工具/nosql/redis/主从配置/sentinel/简介.html">
            
                <a href="../../工具/nosql/redis/主从配置/sentinel/简介.html">
            
                    
                    简介.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7.5.2" data-path="../../工具/nosql/redis/主从配置/sentinel/配置.html">
            
                <a href="../../工具/nosql/redis/主从配置/sentinel/配置.html">
            
                    
                    配置.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7.5.3" data-path="../../工具/nosql/redis/主从配置/sentinel/部署sentinel.html">
            
                <a href="../../工具/nosql/redis/主从配置/sentinel/部署sentinel.html">
            
                    
                    部署sentinel.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7.5.4" data-path="../../工具/nosql/redis/主从配置/sentinel/sentinel初始化内部流程.html">
            
                <a href="../../工具/nosql/redis/主从配置/sentinel/sentinel初始化内部流程.html">
            
                    
                    sentinel初始化内部流程.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.7.6" data-path="../../工具/nosql/redis/主从配置/主从复制可能遇到的问题.html">
            
                <a href="../../工具/nosql/redis/主从配置/主从复制可能遇到的问题.html">
            
                    
                    主从复制可能遇到的问题.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.8" data-path="../../工具/nosql/redis/集群/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/集群/SUMMARY.html">
            
                    
                    集群
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.8.1" data-path="../../工具/nosql/redis/集群/简介.html">
            
                <a href="../../工具/nosql/redis/集群/简介.html">
            
                    
                    简介.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.9" data-path="../../工具/nosql/redis/具体应用/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/具体应用/SUMMARY.html">
            
                    
                    具体应用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.9.1" data-path="../../工具/nosql/redis/具体应用/使用Lua脚本实现分布式锁.html">
            
                <a href="../../工具/nosql/redis/具体应用/使用Lua脚本实现分布式锁.html">
            
                    
                    使用Lua脚本实现分布式锁.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.9.2" data-path="../../工具/nosql/redis/具体应用/用redis实现自动完成.html">
            
                <a href="../../工具/nosql/redis/具体应用/用redis实现自动完成.html">
            
                    
                    用redis实现自动完成.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.10" data-path="../../工具/nosql/redis/info命令详解.html">
            
                <a href="../../工具/nosql/redis/info命令详解.html">
            
                    
                    info命令详解.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.11" data-path="../../工具/nosql/redis/mget性能衰减分析.html">
            
                <a href="../../工具/nosql/redis/mget性能衰减分析.html">
            
                    
                    mget性能衰减分析.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.12" data-path="../../工具/nosql/redis/pipeline性能衰减分析.html">
            
                <a href="../../工具/nosql/redis/pipeline性能衰减分析.html">
            
                    
                    pipeline性能衰减分析.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.13" data-path="../../工具/nosql/redis/版本更新特性/SUMMARY.html">
            
                <a href="../../工具/nosql/redis/版本更新特性/SUMMARY.html">
            
                    
                    版本更新特性
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.9.2.13.1" data-path="../../工具/nosql/redis/版本更新特性/3.0特性.html">
            
                <a href="../../工具/nosql/redis/版本更新特性/3.0特性.html">
            
                    
                    3.0特性.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9.2.14" data-path="../../工具/nosql/redis/常见问题.html">
            
                <a href="../../工具/nosql/redis/常见问题.html">
            
                    
                    常见问题.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="../../工具/Skywalking/SUMMARY.html">
            
                <a href="../../工具/Skywalking/SUMMARY.html">
            
                    
                    Skywalking
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.10.1" data-path="../../工具/Skywalking/SkyWalking.html">
            
                <a href="../../工具/Skywalking/SkyWalking.html">
            
                    
                    SkyWalking.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.11" data-path="../../工具/Zipkin/SUMMARY.html">
            
                <a href="../../工具/Zipkin/SUMMARY.html">
            
                    
                    Zipkin
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.11.1" data-path="../../工具/Zipkin/Zipkin简单使用.html">
            
                <a href="../../工具/Zipkin/Zipkin简单使用.html">
            
                    
                    Zipkin简单使用.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../../解决方案/SUMMARY.html">
            
                <a href="../../解决方案/SUMMARY.html">
            
                    
                    解决方案
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../解决方案/分布式任务调度.html">
            
                <a href="../../解决方案/分布式任务调度.html">
            
                    
                    分布式任务调度.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../解决方案/分布式锁.html">
            
                <a href="../../解决方案/分布式锁.html">
            
                    
                    分布式锁.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../解决方案/分库分表的缺点.html">
            
                <a href="../../解决方案/分库分表的缺点.html">
            
                    
                    分库分表的缺点.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../../解决方案/调优先行知识.html">
            
                <a href="../../解决方案/调优先行知识.html">
            
                    
                    调优先行知识.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../../解决方案/跨网段连接ES.html">
            
                <a href="../../解决方案/跨网段连接ES.html">
            
                    
                    跨网段连接ES.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../../IO/SUMMARY.html">
            
                <a href="../../IO/SUMMARY.html">
            
                    
                    IO
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../../IO/IO.html">
            
                <a href="../../IO/IO.html">
            
                    
                    IO.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../../IO/用户态和内核态.html">
            
                <a href="../../IO/用户态和内核态.html">
            
                    
                    用户态和内核态.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../../IO/内存寻址.html">
            
                <a href="../../IO/内存寻址.html">
            
                    
                    内存寻址.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../../IO/StreamIO/SUMMARY.html">
            
                <a href="../../IO/StreamIO/SUMMARY.html">
            
                    
                    StreamIO
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.4.1" data-path="../../IO/StreamIO/StreamIO.html">
            
                <a href="../../IO/StreamIO/StreamIO.html">
            
                    
                    StreamIO.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="../../IO/ChannelIO/SUMMARY.html">
            
                <a href="../../IO/ChannelIO/SUMMARY.html">
            
                    
                    ChannelIO
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.5.1" data-path="../../IO/ChannelIO/Buffer.html">
            
                <a href="../../IO/ChannelIO/Buffer.html">
            
                    
                    Buffer.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5.2" data-path="../../IO/ChannelIO/ChannelIO.html">
            
                <a href="../../IO/ChannelIO/ChannelIO.html">
            
                    
                    ChannelIO.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5.3" data-path="../../IO/ChannelIO/Selector.html">
            
                <a href="../../IO/ChannelIO/Selector.html">
            
                    
                    Selector.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5.4" data-path="../../IO/ChannelIO/边缘触发和水平触发.html">
            
                <a href="../../IO/ChannelIO/边缘触发和水平触发.html">
            
                    
                    边缘触发和水平触发.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="../../IO/Linux的五种IO模型1.html">
            
                <a href="../../IO/Linux的五种IO模型1.html">
            
                    
                    Linux的五种IO模型1.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="../../IO/Linux的五种IO模型2.html">
            
                <a href="../../IO/Linux的五种IO模型2.html">
            
                    
                    Linux的五种IO模型2.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.8" data-path="../../IO/简单AIO代码.html">
            
                <a href="../../IO/简单AIO代码.html">
            
                    
                    简单AIO代码.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.9" data-path="../../IO/简单BIO代码.html">
            
                <a href="../../IO/简单BIO代码.html">
            
                    
                    简单BIO代码.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.10" data-path="../../IO/简单NIO代码.html">
            
                <a href="../../IO/简单NIO代码.html">
            
                    
                    简单NIO代码.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.11" data-path="../../IO/零拷贝.html">
            
                <a href="../../IO/零拷贝.html">
            
                    
                    零拷贝.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../../监控/SUMMARY.html">
            
                <a href="../../监控/SUMMARY.html">
            
                    
                    监控
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../../监控/JDK本地文件监控.html">
            
                <a href="../../监控/JDK本地文件监控.html">
            
                    
                    JDK本地文件监控.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../../监控/StopWatch_lang3.html">
            
                <a href="../../监控/StopWatch_lang3.html">
            
                    
                    StopWatch_lang3.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../../监控/StopWatch_spring.html">
            
                <a href="../../监控/StopWatch_spring.html">
            
                    
                    StopWatch_spring.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../../监控/Metrics.html">
            
                <a href="../../监控/Metrics.html">
            
                    
                    Metrics.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.5" data-path="../../监控/JMX.html">
            
                <a href="../../监控/JMX.html">
            
                    
                    JMX.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.6" data-path="../../监控/链路监控.html">
            
                <a href="../../监控/链路监控.html">
            
                    
                    链路监控.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../../网络协议/SUMMARY.html">
            
                <a href="../../网络协议/SUMMARY.html">
            
                    
                    网络协议
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../../网络协议/网络分层.html">
            
                <a href="../../网络协议/网络分层.html">
            
                    
                    网络分层.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../../杂/SUMMARY.html">
            
                <a href="../../杂/SUMMARY.html">
            
                    
                    杂
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../../杂/WebService/SUMMARY.html">
            
                <a href="../../杂/WebService/SUMMARY.html">
            
                    
                    WebService
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1.1" data-path="../../杂/WebService/什么是WebService.html">
            
                <a href="../../杂/WebService/什么是WebService.html">
            
                    
                    什么是WebService.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.1.2" data-path="../../杂/WebService/WebService与Socket.html">
            
                <a href="../../杂/WebService/WebService与Socket.html">
            
                    
                    WebService与Socket.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.1.3" data-path="../../杂/WebService/创建WebService服务.html">
            
                <a href="../../杂/WebService/创建WebService服务.html">
            
                    
                    创建WebService服务.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../../杂/借助Idea打包.html">
            
                <a href="../../杂/借助Idea打包.html">
            
                    
                    借助Idea打包.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../../杂/借助Idea调试远程项目.html">
            
                <a href="../../杂/借助Idea调试远程项目.html">
            
                    
                    借助Idea调试远程项目.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../../杂/单元测试/SUMMARY.html">
            
                <a href="../../杂/单元测试/SUMMARY.html">
            
                    
                    单元测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../../杂/获取对象的属性名称.html">
            
                <a href="../../杂/获取对象的属性名称.html">
            
                    
                    获取对象的属性名称.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >ThreadPoolExecutor.md</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-anchor"></i><ul><li><span class="title-icon "></span><a href="#threadpoolexecutor"><b></b>ThreadPoolExecutor</a></li><ul><li><span class="title-icon "></span><a href="#&#x4ECE;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x770B;&#x8D77;"><b></b>&#x4ECE;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x770B;&#x8D77;</a></li><li><span class="title-icon "></span><a href="#&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x4F53;&#x6D41;&#x7A0B;&#x56FE;"><b></b>&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x4F53;&#x6D41;&#x7A0B;&#x56FE;</a></li><li><span class="title-icon "></span><a href="#&#x5173;&#x952E;&#x5C5E;&#x6027;"><b></b>&#x5173;&#x952E;&#x5C5E;&#x6027;</a></li><li><span class="title-icon "></span><a href="#&#x6838;&#x5FC3;&#x6D41;&#x7A0B;&#x89E3;&#x6790;"><b></b>&#x6838;&#x5FC3;&#x6D41;&#x7A0B;&#x89E3;&#x6790;</a></li><ul><li><span class="title-icon "></span><a href="#executerunnable-command"><b></b>execute(Runnable command)</a></li><li><span class="title-icon "></span><a href="#addworkerrunnable-firsttask-boolean-core"><b></b>addWorker(Runnable firstTask, boolean core)</a></li></ul><li><span class="title-icon "></span><a href="#worker&#x5185;&#x90E8;&#x7C7B;"><b></b>Worker&#x5185;&#x90E8;&#x7C7B;</a></li><ul><li><span class="title-icon "></span><a href="#worker&#x6784;&#x9020;&#x65B9;&#x6CD5;"><b></b>Worker&#x6784;&#x9020;&#x65B9;&#x6CD5;</a></li><li><span class="title-icon "></span><a href="#runworkerworker-w"><b></b>runWorker(Worker w)</a></li><li><span class="title-icon "></span><a href="#gettask"><b></b>getTask()</a></li></ul><li><span class="title-icon "></span><a href="#&#x5176;&#x4ED6;&#x65B9;&#x6CD5;&#x89E3;&#x6790;"><b></b>&#x5176;&#x4ED6;&#x65B9;&#x6CD5;&#x89E3;&#x6790;</a></li><ul><li><span class="title-icon "></span><a href="#tryterminate"><b></b>tryTerminate()</a></li></ul></ul></ul></div><a href="#threadpoolexecutor" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="threadpoolexecutor"><a name="threadpoolexecutor" class="anchor-navigation-ex-anchor" href="#threadpoolexecutor"><i class="fa fa-link" aria-hidden="true"></i></a>ThreadPoolExecutor</h1>
<p><a href="https://blog.csdn.net/xiaoqi44325234/article/details/106396871" target="_blank">&#x7EBF;&#x7A0B;&#x6C60;&#xFF1A;ThreadPoolExecutor &#x6E90;&#x7801;&#x89E3;&#x6790;</a></p>
<p><a href="https://tech.meituan.com/2020/04/02/java-pooling-pratice-in-meituan.html" target="_blank">Java&#x7EBF;&#x7A0B;&#x6C60;&#x5B9E;&#x73B0;&#x539F;&#x7406;&#x53CA;&#x5176;&#x5728;&#x7F8E;&#x56E2;&#x4E1A;&#x52A1;&#x4E2D;&#x7684;&#x5B9E;&#x8DF5;</a></p>
<p>&#x200B;        </p>
<h2 id="&#x4ECE;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x770B;&#x8D77;"><a name="&#x4ECE;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x770B;&#x8D77;" class="anchor-navigation-ex-anchor" href="#&#x4ECE;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x770B;&#x8D77;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4ECE;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x770B;&#x8D77;</h2>
<pre><code class="lang-java">ThreadPoolExecutor(<span class="hljs-keyword">int</span> corePoolSize,                      <span class="hljs-comment">// &#x6838;&#x5FC3;&#x7EBF;&#x7A0B;&#x6570;</span>
                   <span class="hljs-keyword">int</span> maximumPoolSize,                 <span class="hljs-comment">// &#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;</span>
                   <span class="hljs-keyword">long</span> keepAliveTime,                    <span class="hljs-comment">// &#x7A7A;&#x4F59;&#x7EBF;&#x7A0B;&#x6700;&#x957F;&#x5B58;&#x6D3B;&#x65F6;&#x95F4;</span>
                   TimeUnit unit,                         <span class="hljs-comment">// keepAliveTime&#x65F6;&#x95F4;&#x5355;&#x4F4D;</span>
                   BlockingQueue&lt;Runnable&gt; workQueue,     <span class="hljs-comment">// &#x963B;&#x585E;&#x961F;&#x5217;&#x7528;&#x4E8E;&#x4FDD;&#x5B58;&#x63D0;&#x4EA4;&#x7684;&#x4EFB;&#x52A1;</span>
                   ThreadFactory threadFactory,             <span class="hljs-comment">// &#x7EBF;&#x7A0B;&#x5DE5;&#x5382;</span>
                   RejectedExecutionHandler handler) {    <span class="hljs-comment">// &#x62D2;&#x7EDD;&#x7B56;&#x7565;</span>
    <span class="hljs-comment">// ......</span>
    <span class="hljs-keyword">this</span>.corePoolSize = corePoolSize;         <span class="hljs-comment">// &#x5173;&#x952E;&#x5C5E;&#x6027;</span>
    <span class="hljs-keyword">this</span>.maximumPoolSize = maximumPoolSize; <span class="hljs-comment">// &#x5173;&#x952E;&#x5C5E;&#x6027;</span>
    <span class="hljs-keyword">this</span>.workQueue = workQueue;
    <span class="hljs-keyword">this</span>.keepAliveTime = unit.toNanos(keepAliveTime);
    <span class="hljs-keyword">this</span>.threadFactory = threadFactory;
    <span class="hljs-keyword">this</span>.handler = handler;
}
</code></pre>
<blockquote>
<p>  threadFactory&#x7684;&#x4F5C;&#x7528;: &#x6784;&#x9020;&#x4E00;&#x4E2A;&#x65B0;&#x7684;Thread. &#x5B9E;&#x73B0;&#x4E5F;&#x53EF;&#x4EE5;&#x521D;&#x59CB;&#x5316;&#x4F18;&#x5148;&#x7EA7;, &#x540D;&#x79F0;, &#x5B88;&#x62A4;&#x7A0B;&#x5E8F;&#x72B6;&#x6001;, ThreadGroup&#x7B49;</p>
</blockquote>
<p>&#x5E38;&#x7528;&#x963B;&#x585E;&#x961F;&#x5217;</p>
<p><img src="ThreadPoolExecutor.assets/725a3db5114d95675f2098c12dc331c3316963.png" alt="&#x5E38;&#x7528;&#x963B;&#x585E;&#x961F;&#x5217;"></p>
<p>&#x5185;&#x7F6E;&#x62D2;&#x7EDD;&#x7B56;&#x7565;</p>
<p><img src="ThreadPoolExecutor.assets/9ffb64cc4c64c0cb8d38dac01c89c905178456.png" alt="&#x5185;&#x7F6E;&#x62D2;&#x7EDD;&#x7B56;&#x7565;"></p>
<h2 id="&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x4F53;&#x6D41;&#x7A0B;&#x56FE;"><a name="&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x4F53;&#x6D41;&#x7A0B;&#x56FE;" class="anchor-navigation-ex-anchor" href="#&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x4F53;&#x6D41;&#x7A0B;&#x56FE;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x4F53;&#x6D41;&#x7A0B;&#x56FE;</h2>
<p><img src="ThreadPoolExecutor.assets/20200529094838836.jpg" alt="&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x4F53;&#x6D41;&#x7A0B;"></p>
<h2 id="&#x5173;&#x952E;&#x5C5E;&#x6027;"><a name="&#x5173;&#x952E;&#x5C5E;&#x6027;" class="anchor-navigation-ex-anchor" href="#&#x5173;&#x952E;&#x5C5E;&#x6027;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5173;&#x952E;&#x5C5E;&#x6027;</h2>
<pre><code class="lang-java"><span class="hljs-comment">// &#x6838;&#x5FC3;&#x7EBF;&#x7A0B;&#x6570;</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">volatile</span> <span class="hljs-keyword">int</span> corePoolSize;
<span class="hljs-comment">// &#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;(&#x903B;&#x8F91;&#x8BBE;&#x5B9A;, &#x4EE3;&#x7801;&#x9650;&#x5236;&#x6700;&#x5927;&#x662F;CAPACITY(5&#x4EBF;&#x591A;))</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">volatile</span> <span class="hljs-keyword">int</span> maximumPoolSize;
<span class="hljs-comment">// &#x4FDD;&#x5B58;&#x7EBF;&#x7A0B;&#x6C60;&#x4E2D;&#x6B63;&#x5728;&#x6267;&#x884C;&#x7684;&#x7EBF;&#x7A0B;</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">final</span> HashSet&lt;Worker&gt; workers = <span class="hljs-keyword">new</span> HashSet&lt;Worker&gt;();
</code></pre>
<p>&#x5173;&#x952E;&#x6807;&#x5FD7;</p>
<pre><code class="lang-java"><span class="hljs-comment">// &#x7EBF;&#x7A0B;&#x6C60;&#x72B6;&#x6001;. &#x9AD8;3&#x4F4D;&#x4FDD;&#x5B58;&#x8FD0;&#x884C;&#x72B6;&#x6001;,&#x4F4E;29&#x4F4D;&#x4FDD;&#x5B58;&#x8FD0;&#x884C;&#x7EBF;&#x7A0B;&#x6570;&#x91CF;(&#x6700;&#x5927;&#x53EF;&#x4EE5;&#x4FDD;&#x5B58;5&#x4EBF;&#x591A;)</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">final</span> AtomicInteger ctl = <span class="hljs-keyword">new</span> AtomicInteger(ctlOf(RUNNING, <span class="hljs-number">0</span>));
<span class="hljs-comment">// &#x8868;&#x793A;&#x4F4E;29&#x4F4D;&#x50A8;&#x5B58;&#x7EBF;&#x7A0B;&#x6570;</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">final</span> <span class="hljs-keyword">int</span> COUNT_BITS = Integer.SIZE - <span class="hljs-number">3</span>;
<span class="hljs-comment">// &#x7528;&#x4E8E;&#x8BA1;&#x7B97;&#x7EBF;&#x7A0B;&#x6570;&#x91CF; 000 111111111 1111111111 1111111111</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">final</span> <span class="hljs-keyword">int</span> CAPACITY   = (<span class="hljs-number">1</span> &lt;&lt; COUNT_BITS) - <span class="hljs-number">1</span>;

<span class="hljs-comment">/* &#x9AD8;2&#x4F4D;&#x50A8;&#x5B58;&#x7EBF;&#x7A0B;&#x6C60;&#x72B6;&#x6001;, &#x4F4E;29&#x4F4D;&#x50A8;&#x5B58;&#x7EBF;&#x7A0B;&#x6570; &#x5927;&#x4E8E;0&#x5C31;&#x662F;&#x975E;&#x8FD0;&#x884C;&#x72B6;&#x6001; */</span>
<span class="hljs-comment">// 101 000000000 0000000000 0000000000 | &#x8FD0;&#x884C;&#x4E2D; &#x63A5;&#x53D7;&#x65B0;&#x4EFB;&#x52A1;&#x5E76;&#x4E14;&#x5904;&#x7406;&#x963B;&#x585E;&#x961F;&#x5217;&#x91CC;&#x7684;&#x4EFB;&#x52A1;</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">final</span> <span class="hljs-keyword">int</span> RUNNING    = -<span class="hljs-number">1</span> &lt;&lt; COUNT_BITS;
<span class="hljs-comment">// 000 000000000 0000000000 0000000000 | &#x5173;&#x95ED;&#x4E2D; &#x62D2;&#x7EDD;&#x65B0;&#x4EFB;&#x52A1;&#x4F46;&#x662F;&#x5904;&#x7406;&#x963B;&#x585E;&#x961F;&#x5217;&#x91CC;&#x7684;&#x4EFB;&#x52A1;</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">final</span> <span class="hljs-keyword">int</span> SHUTDOWN   =  <span class="hljs-number">0</span> &lt;&lt; COUNT_BITS;
<span class="hljs-comment">// 001 000000000 0000000000 0000000000 | &#x505C;&#x6B62;   &#x62D2;&#x7EDD;&#x65B0;&#x4EFB;&#x52A1;,&#x629B;&#x5F03;&#x961F;&#x5217;&#x91CC;&#x7684;&#x4EFB;&#x52A1;,&#x4E2D;&#x65AD;&#x6B63;&#x5728;&#x6267;&#x884C;&#x7684;&#x4EFB;&#x52A1;</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">final</span> <span class="hljs-keyword">int</span> STOP       =  <span class="hljs-number">1</span> &lt;&lt; COUNT_BITS;
<span class="hljs-comment">// 010 000000000 0000000000 0000000000 | &#x6267;&#x884C;&#x5B8C; &#x6240;&#x6709;&#x4EFB;&#x52A1;&#x6267;&#x884C;&#x5B8C;&#x6210;,&#x5C06;&#x8981;&#x8C03;&#x7528;terminated()</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">final</span> <span class="hljs-keyword">int</span> TIDYING    =  <span class="hljs-number">2</span> &lt;&lt; COUNT_BITS;
<span class="hljs-comment">// 011 000000000 0000000000 0000000000 | &#x5DF2;&#x7EC8;&#x6B62; terminated()&#x8C03;&#x7528;&#x5B8C;&#x540E;&#x7684;&#x72B6;&#x6001;</span>
<span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">final</span> <span class="hljs-keyword">int</span> TERMINATED =  <span class="hljs-number">3</span> &lt;&lt; COUNT_BITS;

<span class="hljs-comment">// &#x83B7;&#x53D6;&#x8FD0;&#x884C;&#x72B6;&#x6001;(&#x9AD8;3&#x4F4D;)</span>
<span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">int</span> <span class="hljs-title">runStateOf</span><span class="hljs-params">(<span class="hljs-keyword">int</span> c)</span>     </span>{ <span class="hljs-keyword">return</span> c &amp; ~CAPACITY; }
<span class="hljs-comment">// &#x83B7;&#x53D6;&#x5DE5;&#x4F5C;&#x7EBF;&#x7A0B;&#x7684;&#x6570;&#x91CF;(&#x4F4E;29&#x4F4D;)</span>
<span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">int</span> <span class="hljs-title">workerCountOf</span><span class="hljs-params">(<span class="hljs-keyword">int</span> c)</span>  </span>{ <span class="hljs-keyword">return</span> c &amp; CAPACITY; }
<span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">int</span> <span class="hljs-title">ctlOf</span><span class="hljs-params">(<span class="hljs-keyword">int</span> rs, <span class="hljs-keyword">int</span> wc)</span> </span>{ <span class="hljs-keyword">return</span> rs | wc; }
</code></pre>
<h2 id="&#x6838;&#x5FC3;&#x6D41;&#x7A0B;&#x89E3;&#x6790;"><a name="&#x6838;&#x5FC3;&#x6D41;&#x7A0B;&#x89E3;&#x6790;" class="anchor-navigation-ex-anchor" href="#&#x6838;&#x5FC3;&#x6D41;&#x7A0B;&#x89E3;&#x6790;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6838;&#x5FC3;&#x6D41;&#x7A0B;&#x89E3;&#x6790;</h2>
<h3 id="executerunnable-command"><a name="executerunnable-command" class="anchor-navigation-ex-anchor" href="#executerunnable-command"><i class="fa fa-link" aria-hidden="true"></i></a>execute(Runnable command)</h3>
<p>&#x5C06;&#x4EFB;&#x52A1;&#x4EA4;&#x7ED9;&#x7EBF;&#x7A0B;&#x6C60;, &#x53EF;&#x80FD;&#x89E6;&#x53D1;</p>
<ol>
<li>&#x76F4;&#x63A5;&#x6267;&#x884C;</li>
<li>&#x52A0;&#x5165;&#x963B;&#x585E;&#x961F;&#x5217;&#x7B49;&#x5F85;&#x6267;&#x884C;</li>
<li>&#x89E6;&#x53D1;&#x62D2;&#x7EDD;</li>
</ol>
<blockquote>
<p>  &#x4F18;&#x5148;&#x7EA7;: &#x521B;&#x5EFA;&#x6838;&#x5FC3;&#x7EBF;&#x7A0B; &gt; &#x6DFB;&#x52A0;&#x5230;&#x963B;&#x585E;&#x961F;&#x5217; &gt; &#x521B;&#x5EFA;&#x6700;&#x5927;&#x7EBF;&#x7A0B; (&#x963B;&#x585E;&#x961F;&#x5217;&#x6EE1;&#x4E86;&#x624D;&#x521B;&#x5EFA;&#x6700;&#x5927;&#x7EBF;&#x7A0B;)</p>
</blockquote>
<pre><code class="lang-java"><span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">execute</span><span class="hljs-params">(Runnable command)</span> </span>{
    <span class="hljs-keyword">if</span> (command == <span class="hljs-keyword">null</span>)
        <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> NullPointerException();

    <span class="hljs-comment">// &#x83B7;&#x53D6;ctl</span>
    <span class="hljs-keyword">int</span> c = ctl.get();
    <span class="hljs-keyword">if</span> (workerCountOf(c) &lt; corePoolSize) { <span class="hljs-comment">// &#x5F53;&#x524D;&#x5DE5;&#x4F5C;&#x7EBF;&#x7A0B;&#x6570; &lt; &#x6838;&#x5FC3;&#x7EBF;&#x7A0B;&#x6570; </span>
        <span class="hljs-keyword">if</span> (addWorker(command, <span class="hljs-keyword">true</span>)) <span class="hljs-comment">// &#x65B0;&#x5EFA;&#x4E00;&#x4E2A;&#x7EBF;&#x7A0B;&#x6267;&#x884C;</span>
            <span class="hljs-keyword">return</span>;
        <span class="hljs-comment">// &#x521B;&#x5EFA;&#x5931;&#x8D25;&#x5219;&#x5237;&#x65B0;ctl&#x503C;&#x7EE7;&#x7EED;&#x6267;&#x884C;</span>
        c = ctl.get(); 
    }

    <span class="hljs-comment">// &#x5982;&#x679C;&#x7EBF;&#x7A0B;&#x6C60;&#x5904;&#x4E8E;RUNNING&#x72B6;&#x6001; &#x5219;&#x5C1D;&#x8BD5;&#x5C06;&#x4EFB;&#x52A1;&#x63D2;&#x5165;&#x963B;&#x585E;&#x961F;&#x5217;(&#x6210;&#x529F;:true)</span>
    <span class="hljs-keyword">if</span> (isRunning(c) &amp;&amp; workQueue.offer(command)) {
        <span class="hljs-keyword">int</span> recheck = ctl.get();

        <span class="hljs-comment">// &#x52A0;&#x5165;&#x961F;&#x5217;&#x540E;&#x5224;&#x65AD;: &#x5982;&#x679C;&#x7EBF;&#x7A0B;&#x6C60;&#x4E0D;&#x5904;&#x4E8E;RUNNING &#x5219;&#x5C06;&#x4EFB;&#x52A1;&#x79FB;&#x51FA;&#x961F;&#x5217;</span>
        <span class="hljs-keyword">if</span> (!isRunning(recheck) &amp;&amp; remove(command)) 
            reject(command); <span class="hljs-comment">// &#x6210;&#x529F;&#x79FB;&#x51FA;&#x4EFB;&#x52A1;&#x540E;&#x62D2;&#x7EDD;&#x4EFB;&#x52A1;    </span>

        <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (workerCountOf(recheck) == <span class="hljs-number">0</span>) <span class="hljs-comment">// &#x68C0;&#x67E5;&#x5DE5;&#x4F5C;&#x7EBF;&#x7A0B;&#x6570;&#x662F;&#x5426;&#x4E3A;0</span>
            addWorker(<span class="hljs-keyword">null</span>, <span class="hljs-keyword">false</span>);  <span class="hljs-comment">// &#x5982;&#x679C;&#x7EBF;&#x7A0B;&#x6C60;&#x4E2D;&#x6CA1;&#x6709;&#x7EBF;&#x7A0B;&#x5219;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x7EBF;&#x7A0B;</span>
            <span class="hljs-comment">// addWorker()&#x53C2;&#x6570;&#x4E3A;null&#x8868;&#x793A;&#x53EA;&#x521B;&#x5EFA;&#x65B0;&#x7EBF;&#x7A0B;&#x7528;&#x4E8E;&#x6267;&#x884C;&#x961F;&#x5217;&#x4E2D;&#x7684;&#x4EFB;&#x52A1;</span>
    }

    <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (!addWorker(command, <span class="hljs-keyword">false</span>)) <span class="hljs-comment">// &#x52A0;&#x5165;&#x963B;&#x585E;&#x961F;&#x5217;&#x5931;&#x8D25;&#x5219;&#x5C1D;&#x8BD5;&#x521B;&#x5EFA;&#x7EBF;&#x7A0B;&#x6267;&#x884C;</span>
        reject(command);
}
</code></pre>
<h3 id="addworkerrunnable-firsttask-boolean-core"><a name="addworkerrunnable-firsttask-boolean-core" class="anchor-navigation-ex-anchor" href="#addworkerrunnable-firsttask-boolean-core"><i class="fa fa-link" aria-hidden="true"></i></a>addWorker(Runnable firstTask, boolean core)</h3>
<p>&#x521B;&#x5EFA;&#x65B0;&#x7EBF;&#x7A0B;&#x6267;&#x884C;&#x4EFB;&#x52A1;.</p>
<ul>
<li><code>firstTask</code>&#x4E0D;&#x4E3A;null&#x65F6;, &#x4F18;&#x5148;&#x6267;&#x884C;<code>firstTask</code>, </li>
<li><code>firstTask</code>&#x4E3A;null&#x65F6;, &#x8868;&#x793A;<strong>&#x53EA;&#x65B0;&#x5EFA;&#x7EBF;&#x7A0B;</strong>, &#x4EFB;&#x52A1;&#x4ECE;&#x963B;&#x585E;&#x961F;&#x5217;&#x4E2D;&#x83B7;&#x53D6;</li>
<li><code>core</code>&#x4E3A;true&#x65F6;, &#x5982;&#x679C;&#x7EBF;&#x7A0B;&#x6C60;&#x4E2D;&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x7684;&#x7EBF;&#x7A0B;&#x6570; &gt;= <code>corePoolSize</code> &#x5C31;&#x4E0D;&#x521B;&#x5EFA;&#x7EBF;&#x7A0B;</li>
<li><code>core</code>&#x4E3A;false&#x65F6;, &#x5982;&#x679C;&#x7EBF;&#x7A0B;&#x6C60;&#x4E2D;&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x7684;&#x7EBF;&#x7A0B;&#x6570; &gt;= <code>maximumPoolSize</code> &#x5C31;&#x4E0D;&#x521B;&#x5EFA;&#x7EBF;&#x7A0B;</li>
</ul>
<pre><code class="lang-java"><span class="hljs-comment">/* &#x521B;&#x5EFA;&#x65B0;&#x7EBF;&#x7A0B;&#x6267;&#x884C;&#x4EFB;&#x52A1; */</span>
<span class="hljs-comment">// core=true&#x5219;&#x7528;corePoolSize&#x8BA1;&#x6570;. =false&#x5219;&#x7528;maximumPoolSize&#x8BA1;&#x6570;</span>
<span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">boolean</span> <span class="hljs-title">addWorker</span><span class="hljs-params">(Runnable firstTask, <span class="hljs-keyword">boolean</span> core)</span> </span>{
    retry:
    <span class="hljs-keyword">for</span> (;;) {
        <span class="hljs-keyword">int</span> c = ctl.get();
        <span class="hljs-keyword">int</span> rs = runStateOf(c); <span class="hljs-comment">// &#x8FD0;&#x884C;&#x72B6;&#x6001;</span>

        <span class="hljs-comment">// SHUTDOWN &#x5173;&#x95ED;&#x4E2D; &#x62D2;&#x7EDD;&#x65B0;&#x4EFB;&#x52A1;&#x4F46;&#x662F;&#x5904;&#x7406;&#x963B;&#x585E;&#x961F;&#x5217;&#x91CC;&#x7684;&#x4EFB;&#x52A1;</span>
        <span class="hljs-comment">/* &#x4EE5;&#x4E0B;&#x60C5;&#x51B5;addWorker()&#x5931;&#x8D25;
            1.&#x7EBF;&#x7A0B;&#x6C60;&#x72B6;&#x6001; &gt; SHUTDOWN (&#x62D2;&#x7EDD;&#x6240;&#x6709;&#x4EFB;&#x52A1;)
            2.&#x7EBF;&#x7A0B;&#x6C60;&#x72B6;&#x6001; = SHUTDOWN &amp;&amp; firstTask != null (firstTask&#x662F;&#x65B0;&#x4EFB;&#x52A1;)
            3.&#x7EBF;&#x7A0B;&#x6C60;&#x72B6;&#x6001; = SHUTDOWN &amp;&amp; &#x961F;&#x5217;&#x4E3A;&#x7A7A;(&#x961F;&#x5217;&#x4E3A;&#x7A7A;&#x5C31;&#x4E0D;&#x9700;&#x8981;&#x63A5;&#x53D7;&#x65B0;&#x4EFB;&#x52A1;&#x4E86;)*/</span>
        <span class="hljs-comment">// firstTask==null&#x8868;&#x793A;&#x53EA;&#x521B;&#x5EFA;&#x65B0;&#x7EBF;&#x7A0B;&#x7528;&#x4E8E;&#x6267;&#x884C;&#x961F;&#x5217;&#x4E2D;&#x7684;&#x4EFB;&#x52A1;</span>
        <span class="hljs-keyword">if</span> (rs &gt;= SHUTDOWN &amp;&amp;
            ! (rs == SHUTDOWN &amp;&amp; firstTask == <span class="hljs-keyword">null</span> &amp;&amp; ! workQueue.isEmpty()))
            <span class="hljs-keyword">return</span> <span class="hljs-keyword">false</span>;

        <span class="hljs-keyword">for</span> (;;) {
            <span class="hljs-keyword">int</span> wc = workerCountOf(c); <span class="hljs-comment">// &#x7EBF;&#x7A0B;&#x6570;</span>
               <span class="hljs-comment">// &#x5982;&#x679C;&#x7EBF;&#x7A0B;&#x6570;&#x8D85;&#x8FC7;&#x4E86;&#x9650;&#x5236;addWorker()&#x5931;&#x8D25;</span>
            <span class="hljs-keyword">if</span> (wc &gt;= CAPACITY ||
                wc &gt;= (core ? corePoolSize : maximumPoolSize))
                <span class="hljs-keyword">return</span> <span class="hljs-keyword">false</span>;

            <span class="hljs-comment">// &#x4EE5;CAS&#x65B9;&#x5F0F;&#x4F7F;&#x7EBF;&#x7A0B;&#x6570;+1 &#x6210;&#x529F;&#x5219;&#x8DF3;&#x51FA;&#x5FAA;&#x73AF;</span>
            <span class="hljs-keyword">if</span> (compareAndIncrementWorkerCount(c))
                <span class="hljs-keyword">break</span> retry;

            <span class="hljs-comment">// CAS&#x5931;&#x8D25;&#x5219;&#x91CD;&#x65B0;&#x52A0;&#x8F7D;ctl. &#x8FD0;&#x884C;&#x72B6;&#x6001;&#x6539;&#x53D8;&#x5219;&#x8DF3;&#x56DE;&#x7B2C;5&#x884C;,&#x6CA1;&#x6539;&#x53D8;&#x5219;&#x8DF3;&#x5230;18&#x884C;</span>
            c = ctl.get();
            <span class="hljs-keyword">if</span> (runStateOf(c) != rs)
                <span class="hljs-keyword">continue</span> retry;
        }
    }

    <span class="hljs-keyword">boolean</span> workerStarted = <span class="hljs-keyword">false</span>;
    <span class="hljs-keyword">boolean</span> workerAdded = <span class="hljs-keyword">false</span>;
    Worker w = <span class="hljs-keyword">null</span>;
    <span class="hljs-keyword">try</span> {
        <span class="hljs-comment">// &#x5C06;firstTask&#x5C01;&#x88C5;&#x6210;Worker</span>
        w = <span class="hljs-keyword">new</span> Worker(firstTask);
        <span class="hljs-keyword">final</span> Thread t = w.thread;

        <span class="hljs-keyword">if</span> (t != <span class="hljs-keyword">null</span>) {
            <span class="hljs-keyword">final</span> ReentrantLock mainLock = <span class="hljs-keyword">this</span>.mainLock;
            mainLock.lock();
            <span class="hljs-keyword">try</span> {
                <span class="hljs-keyword">int</span> rs = runStateOf(ctl.get()); <span class="hljs-comment">// &#x83B7;&#x53D6;&#x8FD0;&#x884C;&#x72B6;&#x6001;</span>

                <span class="hljs-comment">/* &#x7EBF;&#x7A0B;&#x6C60;&#x72B6;&#x6001;&#x6B63;&#x5E38;&#x65F6;&#x6267;&#x884C;&#x4E0B;&#x4E00;&#x6B65;
                    1.&#x8FD0;&#x884C;&#x72B6;&#x6001; &lt; SHUTDOWN (RUNNING)
                    2.&#x8FD0;&#x884C;&#x72B6;&#x6001; = SHUTDOWN &#x5E76;&#x4E14;firstTask == null*/</span>
                <span class="hljs-keyword">if</span> (rs &lt; SHUTDOWN ||
                    (rs == SHUTDOWN &amp;&amp; firstTask == <span class="hljs-keyword">null</span>)) {

                    <span class="hljs-comment">// &#x7EBF;&#x7A0B;&#x6CA1;&#x6709;&#x542F;&#x52A8;&#x5C31;&#x5B58;&#x6D3B; &#x629B;&#x51FA;&#x5F02;&#x5E38;</span>
                    <span class="hljs-keyword">if</span> (t.isAlive())
                        <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> IllegalThreadStateException();

                    <span class="hljs-comment">// &#x5C06;worker&#x6DFB;&#x52A0;&#x5230;workers&#x5F53;&#x4E2D;</span>
                    workers.add(w);
                    <span class="hljs-keyword">int</span> s = workers.size();
                    <span class="hljs-keyword">if</span> (s &gt; largestPoolSize)
                        largestPoolSize = s; <span class="hljs-comment">// &#x66F4;&#x65B0;&#x5386;&#x53F2;&#x66F4;&#x65B0;&#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;</span>

                    <span class="hljs-comment">// &#x5C06;workerAdd&#x6807;&#x5FD7;&#x8BBE;&#x7F6E;&#x4E3A;&#x6210;&#x529F;</span>
                    workerAdded = <span class="hljs-keyword">true</span>;
                }
            } <span class="hljs-keyword">finally</span> {
                mainLock.unlock();
            }

            <span class="hljs-comment">// workerAdd&#x6807;&#x5FD7;&#x6210;&#x529F;&#x5219;&#x542F;&#x52A8;&#x7EBF;&#x7A0B; &#x5E76;&#x5C06;workerStart&#x6807;&#x5FD7;&#x8BBE;&#x7F6E;&#x4E3A;&#x6210;&#x529F;</span>
            <span class="hljs-keyword">if</span> (workerAdded) {
                t.start(); <span class="hljs-comment">// &#x5173;&#x952E;!!!!</span>
                workerStarted = <span class="hljs-keyword">true</span>;
            }
        }
    } <span class="hljs-keyword">finally</span> {
        <span class="hljs-comment">// &#x7EBF;&#x7A0B;&#x542F;&#x52A8;&#x5931;&#x8D25;&#x5219;&#x8D70;&#x5931;&#x8D25;&#x6D41;&#x7A0B;</span>
        <span class="hljs-keyword">if</span> (! workerStarted)
            addWorkerFailed(w);
    }
    <span class="hljs-comment">// &#x8FD4;&#x56DE;workerStart&#x6807;&#x8BB0;</span>
    <span class="hljs-keyword">return</span> workerStarted;
}
</code></pre>
<p>&#x200B;        </p>
<h2 id="worker&#x5185;&#x90E8;&#x7C7B;"><a name="worker&#x5185;&#x90E8;&#x7C7B;" class="anchor-navigation-ex-anchor" href="#worker&#x5185;&#x90E8;&#x7C7B;"><i class="fa fa-link" aria-hidden="true"></i></a>Worker&#x5185;&#x90E8;&#x7C7B;</h2>
<p>&#x4ECE;&#x4E0A;&#x9762;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x7EBF;&#x7A0B;&#x6C60;&#x5728;<code>addWorker()</code>&#x5C31;&#x5DF2;&#x7ECF;&#x5B8C;&#x6210;&#x4E86;&#x4E00;&#x534A;&#x7684;&#x903B;&#x8F91;(&#x521B;&#x5EFA;&#x7EBF;&#x7A0B;), &#x5269;&#x4E0B;&#x7684;&#x903B;&#x8F91;&#x5728;Worker&#x7C7B;&#x4E2D;&#x5B9E;&#x73B0;(&#x5177;&#x4F53;&#x6267;&#x884C;)</p>
<p>&#x200B;        </p>
<pre><code class="lang-java"><span class="hljs-keyword">private</span> <span class="hljs-keyword">final</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Worker</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">AbstractQueuedSynchronizer</span> 
                           <span class="hljs-keyword">implements</span> <span class="hljs-title">Runnable</span>
</span></code></pre>
<p>Worker&#x7EE7;&#x627F;AQS&#x7C7B;&#x5B9E;&#x73B0;Runnable&#x63A5;&#x53E3;, &#x6240;&#x4EE5;&#x672C;&#x8D28;&#x4E0A;&#x662F;&#x4E00;&#x4E2A;&#x62E5;&#x6709;&#x4E92;&#x65A5;&#x7279;&#x6027;&#x7684;&#x7EBF;&#x7A0B;</p>
<p>&#x4E92;&#x65A5;&#x7279;&#x6027;&#x4E3B;&#x8981;&#x4F53;&#x73B0;&#x5728;: </p>
<p><strong>worker&#x4E00;&#x65E6;&#x83B7;&#x53D6;&#x4E86;&#x9501;&#x8868;&#x793A;&#x6B63;&#x5728;&#x6267;&#x884C;&#x4EFB;&#x52A1;, &#x5219;&#x4E0D;&#x5E94;&#x8BE5;&#x4E2D;&#x65AD;&#x7EBF;&#x7A0B;. &#x53CD;&#x4E4B;&#x8868;&#x793A;&#x53EF;&#x4EE5;&#x4E2D;&#x65AD;</strong></p>
<p>&#x200B;        </p>
<h3 id="worker&#x6784;&#x9020;&#x65B9;&#x6CD5;"><a name="worker&#x6784;&#x9020;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#worker&#x6784;&#x9020;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>Worker&#x6784;&#x9020;&#x65B9;&#x6CD5;</h3>
<pre><code class="lang-java">Worker(Runnable firstTask) {
    <span class="hljs-comment">// &#x8BBE;&#x5B9A;&#x521D;&#x59CB;&#x4E3A;-1, runWorker(this)&#x8C03;&#x7528;w.unlock()&#x524D;&#x5176;&#x4F59;&#x90FD;&#x4E0D;&#x80FD;&#x83B7;&#x53D6;&#x5230;&#x9501;</span>
    <span class="hljs-comment">// runWorker(this)&#x540E;&#x624D;&#x5141;&#x8BB8;&#x4E2D;&#x65AD;</span>
    setState(-<span class="hljs-number">1</span>);
    <span class="hljs-keyword">this</span>.firstTask = firstTask;
    <span class="hljs-keyword">this</span>.thread = getThreadFactory().newThread(<span class="hljs-keyword">this</span>);
}
</code></pre>
<h3 id="runworkerworker-w"><a name="runworkerworker-w" class="anchor-navigation-ex-anchor" href="#runworkerworker-w"><i class="fa fa-link" aria-hidden="true"></i></a>runWorker(Worker w)</h3>
<p>&#x6267;&#x884C;&#x4EFB;&#x52A1;, &#x6267;&#x884C;&#x5B8C;&#x6210;&#x4E86;&#x4F1A;&#x4ECE;&#x963B;&#x585E;&#x961F;&#x5217;&#x4E2D;&#x83B7;&#x53D6;</p>
<pre><code class="lang-java"><span class="hljs-function"><span class="hljs-keyword">final</span> <span class="hljs-keyword">void</span> <span class="hljs-title">runWorker</span><span class="hljs-params">(Worker w)</span> </span>{
    Thread wt = Thread.currentThread();
    Runnable task = w.firstTask;
    w.firstTask = <span class="hljs-keyword">null</span>; <span class="hljs-comment">// </span>
    w.unlock(); <span class="hljs-comment">// &#x5BF9;&#x5E94;&#x6784;&#x9020;&#x65B9;&#x6CD5;setState(-1); </span>
    <span class="hljs-keyword">boolean</span> completedAbruptly = <span class="hljs-keyword">true</span>; <span class="hljs-comment">// &#x5F02;&#x5E38;&#x6807;&#x8BC6;</span>
    <span class="hljs-keyword">try</span> {
        <span class="hljs-comment">// &#x521D;&#x59CB;&#x4EFB;&#x52A1;&#x4E0D;&#x4E3A;null &#x6216;&#x8005; &#x4ECE;&#x963B;&#x585E;&#x961F;&#x5217;&#x4E2D;&#x6210;&#x529F;&#x83B7;&#x53D6;&#x4EFB;&#x52A1; &#x5219;&#x7EE7;&#x7EED;&#x6267;&#x884C;</span>
        <span class="hljs-keyword">while</span> (task != <span class="hljs-keyword">null</span> || (task = getTask()) != <span class="hljs-keyword">null</span>) {
            <span class="hljs-comment">// task != null&#x6807;&#x8BC6;&#x6709;&#x4EFB;&#x52A1;&#x9700;&#x8981;&#x6267;&#x884C;, &#x62A2;&#x5360;&#x9501;(&#x5C06;worker&#x72B6;&#x6001;&#x6539;&#x4E3A;&#x6267;&#x884C;&#x4E2D;)</span>
            w.lock();

            <span class="hljs-comment">/* &#x7EBF;&#x7A0B;&#x6C60;&#x72B6;&#x6001;&gt;=STOP(&#x62D2;&#x7EDD;&#x6240;&#x6709;&#x4EFB;&#x52A1;)&#x5219;&#x5E94;&#x8BE5;&#x4E2D;&#x65AD; 
                Thread.interrupted() =&gt; &#x4F1A;&#x6E05;&#x9664;&#x4E2D;&#x65AD;&#x72B6;&#x6001;
                wt.isInterrupted()   =&gt; &#x4E0D;&#x4F1A;&#x4E2D;&#x65AD;&#x72B6;&#x6001; */</span>
            <span class="hljs-keyword">if</span> ( (runStateAtLeast(ctl.get(), STOP) ||
                     (Thread.interrupted() &amp;&amp; runStateAtLeast(ctl.get(), STOP)))
                &amp;&amp; !wt.isInterrupted() )
                wt.interrupt();

            <span class="hljs-keyword">try</span> {
                beforeExecute(wt, task); <span class="hljs-comment">// &#x6267;&#x884C;&#x4EFB;&#x52A1;&#x524D;&#x7684;&#x5904;&#x7406;&#x7531;&#x5B50;&#x7C7B;&#x5B9E;&#x73B0;</span>
                Throwable thrown = <span class="hljs-keyword">null</span>;
                <span class="hljs-keyword">try</span> {
                    task.run(); <span class="hljs-comment">// &#x6267;&#x884C;&#x903B;&#x8F91;</span>
                } <span class="hljs-keyword">catch</span> (RuntimeException x) {
                    thrown = x; <span class="hljs-keyword">throw</span> x;
                } <span class="hljs-keyword">catch</span> (Error x) {
                    thrown = x; <span class="hljs-keyword">throw</span> x;
                } <span class="hljs-keyword">catch</span> (Throwable x) {
                    thrown = x; <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error(x);
                } <span class="hljs-keyword">finally</span> {
                    afterExecute(task, thrown); <span class="hljs-comment">// &#x6267;&#x884C;&#x4EFB;&#x52A1;&#x540E;&#x7684;&#x5904;&#x7406;&#x7531;&#x5B50;&#x7C7B;&#x5B9E;&#x73B0;</span>
                }
            } <span class="hljs-keyword">finally</span> {
                task = <span class="hljs-keyword">null</span>;
                w.completedTasks++; <span class="hljs-comment">// &#x7EBF;&#x7A0B;&#x4EFB;&#x52A1;&#x8BA1;&#x6570;&#x5668;&#x81EA;&#x589E;</span>
                w.unlock();         <span class="hljs-comment">// &#x89E3;&#x9501;</span>
            }
        }
        completedAbruptly = <span class="hljs-keyword">false</span>; <span class="hljs-comment">// &#x5F02;&#x5E38;&#x6807;&#x8BC6;&#x4E3A;false</span>
    } <span class="hljs-keyword">finally</span> {
        processWorkerExit(w, completedAbruptly);
    }
}
</code></pre>
<h3 id="gettask"><a name="gettask" class="anchor-navigation-ex-anchor" href="#gettask"><i class="fa fa-link" aria-hidden="true"></i></a>getTask()</h3>
<p>&#x4ECE;&#x963B;&#x585E;&#x961F;&#x5217;&#x4E2D;&#x83B7;&#x53D6;&#x4EFB;&#x52A1;</p>
<pre><code class="lang-java"><span class="hljs-function"><span class="hljs-keyword">private</span> Runnable <span class="hljs-title">getTask</span><span class="hljs-params">()</span> </span>{
    <span class="hljs-keyword">boolean</span> timedOut = <span class="hljs-keyword">false</span>; <span class="hljs-comment">// Did the last poll() time out?</span>

    <span class="hljs-keyword">for</span> (;;) {
        <span class="hljs-keyword">int</span> c = ctl.get();
        <span class="hljs-keyword">int</span> rs = runStateOf(c);

        <span class="hljs-comment">// &#x5982;&#x679C;&#x7EBF;&#x7A0B;&#x6C60;&#x5DF2;&#x7ECF;&#x5173;&#x95ED; || &#x963B;&#x585E;&#x961F;&#x5217;&#x5DF2;&#x7ECF;&#x7A7A;&#x4E86;</span>
        <span class="hljs-keyword">if</span> (rs &gt;= SHUTDOWN &amp;&amp; (rs &gt;= STOP || workQueue.isEmpty())) {
            decrementWorkerCount(); <span class="hljs-comment">// &#x81EA;&#x65CB;&#x65B9;&#x5F0F;&#x5C06;ctl&#x4E2D;&#x7684;&#x7EBF;&#x7A0B;&#x6570;&#x91CF;-1</span>
            <span class="hljs-keyword">return</span> <span class="hljs-keyword">null</span>;            <span class="hljs-comment">// &#x8FD4;&#x56DE;null &#x7EBF;&#x7A0B;&#x5C06;&#x9000;&#x51FA;&#x81EA;&#x65CB;&#x968F;&#x540E;&#x9500;&#x6BC1;</span>
        }

        <span class="hljs-keyword">int</span> wc = workerCountOf(c);

        <span class="hljs-comment">// &#x5982;&#x679C;allowCoreThreadTimeOut(&#x6838;&#x5FC3;&#x7EBF;&#x7A0B;&#x5141;&#x8BB8;&#x8D85;&#x65F6;) || &#x73B0;&#x6709;&#x7EBF;&#x7A0B; &gt; &#x6838;&#x5FC3;&#x7EBF;&#x7A0B;</span>
        <span class="hljs-keyword">boolean</span> timed = allowCoreThreadTimeOut || wc &gt; corePoolSize;

        <span class="hljs-comment">/* &#x51FA;&#x73B0;&#x4EE5;&#x4E0B;&#x60C5;&#x51B5;(2&#x4E2A;&#x4E00;&#x8D77;&#x51FA;&#x73B0;)&#x8981;&#x5C1D;&#x8BD5;&#x9500;&#x6BC1;&#x7EBF;&#x7A0B;
            1. &#x7EBF;&#x7A0B;&#x6570;&#x91CF; &gt; &#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570; || &#x5DF2;&#x7ECF;&#x8D85;&#x65F6;
            2. &#x5B58;&#x6D3B;&#x7EBF;&#x7A0B; &gt; 1    || &#x961F;&#x5217;&#x4E3A;&#x7A7A; (&#x5982;&#x679C;&#x961F;&#x5217;&#x4E0D;&#x4E3A;&#x7A7A;&#x8981;&#x786E;&#x4FDD;&#x6709;&#x7EBF;&#x7A0B;&#x6D88;&#x8D39;&#x4EFB;&#x52A1;)  */</span>
        <span class="hljs-keyword">if</span> ((wc &gt; maximumPoolSize || (timed &amp;&amp; timedOut))
            &amp;&amp; (wc &gt; <span class="hljs-number">1</span> || workQueue.isEmpty())) {
            <span class="hljs-keyword">if</span> (compareAndDecrementWorkerCount(c)) <span class="hljs-comment">// CAS&#x51CF;&#x53BB;&#x7EBF;&#x7A0B;&#x6570;</span>
                <span class="hljs-keyword">return</span> <span class="hljs-keyword">null</span>; 
            <span class="hljs-keyword">continue</span>; <span class="hljs-comment">// &#x5982;&#x679C;CAS&#x5931;&#x8D25;&#x8868;&#x793A;&#x6709;&#x7EBF;&#x7A0B;&#x6B63;&#x5728;&#x9000;&#x51FA; &#x5728;&#x5224;&#x65AD;&#x4E00;&#x6B21;</span>
        }

        <span class="hljs-keyword">try</span> {
            Runnable r = timed ?
                workQueue.poll(keepAliveTime, TimeUnit.NANOSECONDS) :
                workQueue.take();
            <span class="hljs-keyword">if</span> (r != <span class="hljs-keyword">null</span>)
                <span class="hljs-keyword">return</span> r;
            timedOut = <span class="hljs-keyword">true</span>;
        } <span class="hljs-keyword">catch</span> (InterruptedException retry) {
            timedOut = <span class="hljs-keyword">false</span>;
        }
    }
}
</code></pre>
<h2 id="&#x5176;&#x4ED6;&#x65B9;&#x6CD5;&#x89E3;&#x6790;"><a name="&#x5176;&#x4ED6;&#x65B9;&#x6CD5;&#x89E3;&#x6790;" class="anchor-navigation-ex-anchor" href="#&#x5176;&#x4ED6;&#x65B9;&#x6CD5;&#x89E3;&#x6790;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5176;&#x4ED6;&#x65B9;&#x6CD5;&#x89E3;&#x6790;</h2>
<h3 id="tryterminate"><a name="tryterminate" class="anchor-navigation-ex-anchor" href="#tryterminate"><i class="fa fa-link" aria-hidden="true"></i></a>tryTerminate()</h3>
<p>&#x5C1D;&#x8BD5;&#x5173;&#x95ED;&#x7EBF;&#x7A0B;</p>
<pre><code class="lang-java"><span class="hljs-comment">/* &#x5F53;&#x7EBF;&#x7A0B;&#x6C60;&#x51FA;&#x73B0;&#x5F02;&#x5E38;&#x72B6;&#x6001;&#x65F6;&#x5C1D;&#x8BD5;&#x5173;&#x95ED;&#x7EBF;&#x7A0B;&#x6C60; */</span>
<span class="hljs-function"><span class="hljs-keyword">final</span> <span class="hljs-keyword">void</span> <span class="hljs-title">tryTerminate</span><span class="hljs-params">()</span> </span>{
    <span class="hljs-keyword">for</span> (;;) {
        <span class="hljs-comment">// &#x83B7;&#x53D6;ctl</span>
        <span class="hljs-keyword">int</span> c = ctl.get();

        <span class="hljs-comment">/* &#x7EBF;&#x7A0B;&#x6C60;&#x5904;&#x4E8E;&#x4EE5;&#x4E0B;&#x72B6;&#x6001;&#x65F6;&#x4E0D;&#x80FD;&#x88AB;&#x5173;&#x95ED;
            1.&#x8FD0;&#x884C;&#x4E2D;
            2.&#x6267;&#x884C;&#x5B8C;(TIDYING)&#x6216;&#x5DF2;&#x7EC8;&#x6B62;(TERMINATED)
            3.&#x7EBF;&#x7A0B;&#x72B6;&#x6001;&#x4E3A;SHUTDOWN&#x5E76;&#x4E14;&#x963B;&#x585E;&#x961F;&#x5217;&#x4E0D;&#x4E3A;&#x7A7A;*/</span>
        <span class="hljs-keyword">if</span> (isRunning(c) ||
            runStateAtLeast(c, TIDYING) ||
            (runStateOf(c) == SHUTDOWN &amp;&amp; ! workQueue.isEmpty()))
            <span class="hljs-keyword">return</span>;

        <span class="hljs-comment">// &#x5982;&#x679C;&#x5DE5;&#x4F5C;&#x7EBF;&#x7A0B;&#x6570; &gt; 0. &#x5219;&#x7ED9;&#x4E00;&#x4E2A;worker&#x53D1;&#x9001;&#x4E2D;&#x65AD;&#x4FE1;&#x53F7;</span>
        <span class="hljs-keyword">if</span> (workerCountOf(c) != <span class="hljs-number">0</span>) { 
            interruptIdleWorkers(ONLY_ONE);
            <span class="hljs-keyword">return</span>;
        }

        <span class="hljs-keyword">final</span> ReentrantLock mainLock = <span class="hljs-keyword">this</span>.mainLock;
        mainLock.lock();
        <span class="hljs-keyword">try</span> {
            <span class="hljs-comment">// &#x4EE5;CAS&#x65B9;&#x5F0F;&#x8BBE;&#x7F6E;ctl&#x4E3A;TIDYING&#x72B6;&#x6001;. &#x5931;&#x8D25;&#x5219;&#x81EA;&#x65CB;</span>
            <span class="hljs-keyword">if</span> (ctl.compareAndSet(c, ctlOf(TIDYING, <span class="hljs-number">0</span>))) {
                <span class="hljs-keyword">try</span> {
                    terminated(); <span class="hljs-comment">// &#x7559;&#x7ED9;&#x5B50;&#x7C7B;&#x5B9E;&#x73B0;</span>
                } <span class="hljs-keyword">finally</span> {
                    ctl.set(ctlOf(TERMINATED, <span class="hljs-number">0</span>)); <span class="hljs-comment">// &#x76F4;&#x63A5;&#x8BBE;&#x7F6E;ctl&#x4E3A;TERMINATED</span>
                    termination.signalAll(); <span class="hljs-comment">// &#x5524;&#x9192;&#x6240;&#x6709;&#x7B49;&#x5F85;&#x7EBF;&#x7A0B;</span>
                }
                <span class="hljs-keyword">return</span>;
            }
        } <span class="hljs-keyword">finally</span> {
            mainLock.unlock();
        }
        <span class="hljs-comment">// else retry on failed CAS</span>
    }
}
</code></pre>
<p><hr><div id="vcomments"></div><script src="//unpkg.com/valine/dist/Valine.min.js"></script><script>new Valine({el: "#vcomments",appId: 'qorxDDyAw2HVeR43JA9UynNf-gzGzoHsz',appKey: 'fjxXbfHqEhtFc58pCX6dS5Qe',placeholder: 'Just go go',avatar: 'mp',meta: undefined,pageSize: 10,lang: 'zh-CN',recordIP: false})</script></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="SUMMARY.html" class="navigation navigation-prev " aria-label="Previous page: 线程池">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="线程池.html" class="navigation navigation-next " aria-label="Next page: 线程池.md">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"ThreadPoolExecutor.md","level":"1.4.10.1","depth":3,"next":{"title":"线程池.md","level":"1.4.10.2","depth":3,"path":"Java/线程池/线程池.md","ref":"Java/线程池/线程池.md","articles":[]},"previous":{"title":"线程池","level":"1.4.10","depth":2,"path":"Java/线程池/SUMMARY.md","ref":"Java/线程池/SUMMARY.md","articles":[{"title":"ThreadPoolExecutor.md","level":"1.4.10.1","depth":3,"path":"Java/线程池/ThreadPoolExecutor.md","ref":"Java/线程池/ThreadPoolExecutor.md","articles":[]},{"title":"线程池.md","level":"1.4.10.2","depth":3,"path":"Java/线程池/线程池.md","ref":"Java/线程池/线程池.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["chapter-fold","splitter","flexible-alerts","ancre-navigation","valine"],"pluginsConfig":{"chapter-fold":{},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"ancre-navigation":{"associatedWithSummary":true,"float":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showLevel":true},"flexible-alerts":{"danger":{"className":"danger","icon":"fa fa-ban","label":"Attention"},"note":{"className":"info","icon":"fa fa-info-circle","label":"Note"},"style":"flat","tip":{"className":"tip","icon":"fa fa-lightbulb-o","label":"Tip"},"warning":{"className":"warning","icon":"fa fa-exclamation-triangle","label":"Warning"},"notice":{"label":{"de":"注意","en":"注意"},"className":"danger","labelVisibility":"hidden","iconVisibility":"hidden"}},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"valine":{"avatar":"mp","lang":"zh-CN","pageSize":10,"placeholder":"Just go go","recordIP":false,"appId":"qorxDDyAw2HVeR43JA9UynNf-gzGzoHsz","appKey":"fjxXbfHqEhtFc58pCX6dS5Qe","visitor":true}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"website.css"}},"file":{"path":"Java/线程池/ThreadPoolExecutor.md","mtime":"2021-04-01T15:00:20.531Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-03-25T15:30:14.152Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

